DESCRIBE AGGREGATE
Shows this output depending on the options selected:
-
All user-defined aggregates (UDAs) in the current keyspace.
-
All UDAs in the cluster when no keyspace is selected.
-
Definition as an executable CQL statement for a specific UDA.
Synopsis
DESCRIBE AGGREGATES | AGGREGATE [<keyspace_name>.]<uda_name>
Syntax legend
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. |
AGGREGATES
-
All aggregates.
AGGREGATE
-
One aggregate.
- <keyspace_name>
-
Name of the keyspace
- <uda_name>
-
Name of the user-defined aggregate.
Examples
List all cycling aggregates:
USE cycling; DESC AGGREGATES;
average(int)
Show the definition of the cycling average aggregate:
DESC AGGREGATE cycling.average
The result is an executable CQL statement:
CREATE AGGREGATE cycling.average(int)
SFUNC avgstate
STYPE frozen<tuple<int, bigint>>
FINALFUNC avgfinal
INITCOND (0, 0);