public class AggregateMetadata extends Object
CREATE AGGREGATE...
).Modifier and Type | Method and Description |
---|---|
String |
asCQLQuery()
Returns a CQL query representing this function.
|
boolean |
equals(Object other) |
String |
exportAsString()
Returns a CQL query representing this function in human readable form.
|
List<DataType> |
getArgumentTypes()
Returns the types of this aggregate's arguments.
|
FunctionMetadata |
getFinalFunc()
Returns the final function of this aggregate.
|
Object |
getInitCond()
Returns the initial state value of this aggregate.
|
KeyspaceMetadata |
getKeyspace()
Returns the keyspace this aggregate belongs to.
|
DataType |
getReturnType()
Returns the return type of this aggregate.
|
String |
getSignature()
Returns the CQL signature of this aggregate.
|
String |
getSimpleName()
Returns the simple name of this aggregate.
|
FunctionMetadata |
getStateFunc()
Returns the state function of this aggregate.
|
DataType |
getStateType()
Returns the state type of this aggregate.
|
int |
hashCode() |
String |
toString() |
public String exportAsString()
asCQLQuery()
but the output is formatted.public String asCQLQuery()
public KeyspaceMetadata getKeyspace()
public String getSignature()
CREATE AGGREGATE...
statement, for example sum(int)
.
Note that the returned signature is not qualified with the keyspace name.public String getSimpleName()
sum(int)
and sum(int,int)
both have the simple name sum
.getSignature()
public List<DataType> getArgumentTypes()
public FunctionMetadata getFinalFunc()
FINALFUNC
in the CREATE AGGREGATE...
statement. It transforms the final value after the aggregation is complete.null
if there is none.public Object getInitCond()
INITCOND
in the CREATE AGGREGATE...
statement. It's passed to the initial invocation of the state function (if that function
does not accept null arguments).
The actual type of the returned object depends on the aggregate's
state type
and on the codec
used
to parse
the INITCOND
literal.
If, for some reason, the INITCOND
literal cannot be parsed,
a warning will be logged and the returned object will be the original
INITCOND
literal in its textual, non-parsed form.null
if there is none.public DataType getReturnType()
public FunctionMetadata getStateFunc()
SFUNC
in the CREATE AGGREGATE...
statement. It aggregates the current state with each row to produce a new state.public DataType getStateType()
STYPE
in the CREATE AGGREGATE...
statement. It defines the type of the value that is accumulated as the aggregate
iterates through the rows.Copyright © 2012–2017. All rights reserved.