Package org.yamcs.yarch.streamsql
Class AggregateExpression
java.lang.Object
org.yamcs.yarch.streamsql.Expression
org.yamcs.yarch.streamsql.AggregateExpression
- Direct Known Subclasses:
AggregateListExpression
,CompilableAggregateExpression
,FirstValExpression
Expressions containing aggregates are computed in two phases:
phase 1: the input tuples are passed to a list of expressions composed by the group by columns and the list of
aggregates
phase 2: the output tuples of phase 1 are passed to the list of original select list. In this phase, aggregates act
as a ColumnExpression
-
Field Summary
Fields inherited from class org.yamcs.yarch.streamsql.Expression
children, constantValue, hasAggregates, inputDef, type
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
bind
(TupleDefinition def) void
When this is called, all the children are already bound.compile()
void
abstract CompiledAggregateExpression
protected boolean
Methods inherited from class org.yamcs.yarch.streamsql.Expression
addFilter, collectAggregates, collectRequiredInputs, doBind, fillCode_Constructor, fillCode_Declarations, fillCode_getValueBody, fillCode_InputDefVars, getColumnName, getConstantValue, getType, isConstant, setArgs, setColumnName
-
Constructor Details
-
AggregateExpression
- Throws:
ParseException
-
-
Method Details
-
isAggregate
protected boolean isAggregate()- Overrides:
isAggregate
in classExpression
-
bindAggregate
When this is called, all the children are already bound.- Throws:
StreamSqlException
-
bind
- Overrides:
bind
in classExpression
- Throws:
StreamSqlException
-
fillCode_getValueReturn
- Specified by:
fillCode_getValueReturn
in classExpression
- Throws:
StreamSqlException
-
compile
- Overrides:
compile
in classExpression
- Throws:
StreamSqlException
-
getCompiledAggregate
- Throws:
StreamSqlException
-