DESCRIBE AGGREGATE
Print information about user-defined aggregates (UDAs), depending on selected options:
-
A list of all UDAs in the current keyspace.
-
A list of all UDAs in the cluster when no keyspace is selected.
-
One UDA, as an executable CQL statement.
Can be used to verify that a UDA exists.
Synopsis
DESCRIBE AGGREGATES | AGGREGATE [<keyspace_name>.]<uda_name>
| Syntax conventions | Description |
|---|---|
UPPERCASE |
Literal keyword. |
Lowercase |
Not literal. |
|
Variable value. Replace with a user-defined value. |
|
Optional.
Square brackets ( |
|
Group.
Parentheses ( |
|
Or.
A vertical bar ( |
|
Repeatable.
An ellipsis ( |
|
Single quotation ( |
|
Map collection.
Braces ( |
|
Set, list, map, or tuple.
Angle brackets ( |
|
End CQL statement.
A semicolon ( |
|
Separate the command line options from the command arguments with two hyphens ( |
|
Search CQL only: Single quotation marks ( |
|
Search CQL only: Identify the entity and literal value to overwrite the XML element in the schema and solrConfig files. |
- DESCRIBE AGGREGATES
-
Get all aggregates for the current keyspace. If no keyspace is selected, get all aggregates in the cluster.
Requires no other arguments.
The short form is
DESC AGGREGATES. - DESCRIBE AGGREGATE
-
Get one aggregate specified by name.
The short form is
DESC AGGREGATE. - <keyspace_name>
-
Optional. Name of the keyspace containing the aggregate for
DESCRIBE AGGREGATE. If not specified, the current keyspace is used. - <uda_name>
-
Name of the aggregate for
DESCRIBE AGGREGATE.
Examples
- List all aggregates in a keyspace
-
Select the keyspace with
USE, and then runDESC AGGREGATESwith no arguments:USE cycling; DESC AGGREGATES;The output is a list of aggregate signatures (names and argument types).
- Get the definition for a specific aggregate
-
Specify the keyspace (optional) and name of the aggregate to describe:
DESC AGGREGATE cycling.average;If the aggregate exists, the result is the aggregate definition as an executable CQL statement:
CREATE AGGREGATE cycling.average(int) SFUNC avgstate STYPE frozen<tuple<int, bigint>> FINALFUNC avgfinal INITCOND (0, 0);