net.esper.eql.expression
Class ExprCountNode
java.lang.Object
net.esper.eql.expression.ExprNode
net.esper.eql.expression.ExprAggregateNode
net.esper.eql.expression.ExprCountNode
- All Implemented Interfaces:
- ExprEvaluator, ExprValidator, MetaDefItem
public class ExprCountNode
- extends ExprAggregateNode
Represents the count(...) and count(*) and count(distinct ...) aggregate function is an expression tree.
Methods inherited from class net.esper.eql.expression.ExprAggregateNode |
equalsNode, evaluate, getAggregatesBottomUp, getPrototypeAggregator, getType, isConstantResult, isDistinct, setAggregationResultFuture, toExpressionString, validate, validateSingleNumericChild |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExprCountNode
public ExprCountNode(boolean distinct)
- Ctor.
- Parameters:
distinct
- - flag indicating unique or non-unique value aggregation
validateAggregationChild
public AggregationMethod validateAggregationChild(StreamTypeService streamTypeService,
MethodResolutionService methodResolutionService)
throws ExprValidationException
- Description copied from class:
ExprAggregateNode
- Gives the aggregation node a chance to validate the sub-expression types.
- Specified by:
validateAggregationChild
in class ExprAggregateNode
- Parameters:
streamTypeService
- is the types per streammethodResolutionService
- used for resolving method and function names
- Returns:
- aggregation function use
- Throws:
ExprValidationException
- when expression validation failed
getAggregationFunctionName
protected String getAggregationFunctionName()
- Description copied from class:
ExprAggregateNode
- Returns the aggregation function name for representation in a generate expression string.
- Specified by:
getAggregationFunctionName
in class ExprAggregateNode
- Returns:
- aggregation function name
equalsNodeAggregate
public final boolean equalsNodeAggregate(ExprAggregateNode node)
- Description copied from class:
ExprAggregateNode
- Return true if a expression aggregate node semantically equals the current node, or false if not.
For use by the equalsNode implementation which compares the distinct flag.
- Specified by:
equalsNodeAggregate
in class ExprAggregateNode
- Parameters:
node
- to compare to
- Returns:
- true if semantically equal, or false if not equals