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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbind(TupleDefinition def) voidWhen this is called, all the children are already bound.compile()voidabstract CompiledAggregateExpressionprotected booleanMethods 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:
isAggregatein classExpression
-
bindAggregate
When this is called, all the children are already bound.- Throws:
StreamSqlException
-
bind
- Overrides:
bindin classExpression- Throws:
StreamSqlException
-
fillCode_getValueReturn
- Specified by:
fillCode_getValueReturnin classExpression- Throws:
StreamSqlException
-
compile
- Overrides:
compilein classExpression- Throws:
StreamSqlException
-
getCompiledAggregate
- Throws:
StreamSqlException
-