public interface AggregateMetadata extends Describable
| Modifier and Type | Method and Description |
|---|---|
default String |
describe(boolean pretty)
Returns a single CQL statement that creates the element.
|
default String |
describeWithChildren(boolean pretty)
Returns a CQL script that creates the element and all of its children.
|
Optional<String> |
formatInitCond()
Formats the initial state value for inclusion in a CQL statement.
|
Optional<FunctionSignature> |
getFinalFuncSignature()
The signature of the final function of this aggregate, or empty if there is none.
|
Optional<Object> |
getInitCond()
The initial state value of this aggregate, or
null if there is none. |
CqlIdentifier |
getKeyspace() |
DataType |
getReturnType()
The return type of this aggregate.
|
FunctionSignature |
getSignature() |
FunctionSignature |
getStateFuncSignature()
The signature of the state function of this aggregate.
|
DataType |
getStateType()
The state type of this aggregate.
|
@NonNull CqlIdentifier getKeyspace()
@NonNull FunctionSignature getSignature()
@NonNull Optional<FunctionSignature> getFinalFuncSignature()
This is the function specified with FINALFUNC in the CREATE AGGREGATE...
statement. It transforms the final value after the aggregation is complete.
@NonNull Optional<Object> getInitCond()
null if there is none.
This is the value specified with 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.
@NonNull DataType getReturnType()
This is the final type of the value computed by this aggregate; in other words, the return type of the final function if it is defined, or the state type otherwise.
@NonNull FunctionSignature getStateFuncSignature()
This is the function specified with SFUNC in the CREATE AGGREGATE...
statement. It aggregates the current state with each row to produce a new state.
@NonNull DataType getStateType()
This is the type specified with STYPE in the CREATE AGGREGATE... statement.
It defines the type of the value that is accumulated as the aggregate iterates through the
rows.
@NonNull default String describeWithChildren(boolean pretty)
DescribabledescribeWithChildren in interface Describablepretty - if true, make the output more human-readable (line breaks, indents, and
pretty identifiers). If false, return each
statement on a single line with minimal formatting.@NonNull default String describe(boolean pretty)
Describabledescribe in interface Describablepretty - if true, make the output more human-readable (line breaks, indents, and
pretty identifiers). If false, return the
statement on a single line with minimal formatting.@NonNull Optional<String> formatInitCond()
Copyright © 2017–2025. All rights reserved.