net.esper.eql.expression
Class ExprMinMaxAggrNode

java.lang.Object
  extended by net.esper.eql.expression.ExprNode
      extended by net.esper.eql.expression.ExprAggregateNode
          extended by net.esper.eql.expression.ExprMinMaxAggrNode
All Implemented Interfaces:
Serializable, ExprEvaluator, ExprValidator, MetaDefItem

public class ExprMinMaxAggrNode
extends ExprAggregateNode

Represents the min/max(distinct? ...) aggregate function is an expression tree.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class net.esper.eql.expression.ExprNode
ExprNode.MappedPropertyParseResult
 
Field Summary
 
Fields inherited from class net.esper.eql.expression.ExprAggregateNode
isDistinct
 
Constructor Summary
ExprMinMaxAggrNode(boolean distinct, MinMaxTypeEnum minMaxTypeEnum)
          Ctor.
 
Method Summary
 boolean equalsNodeAggregate(ExprAggregateNode node)
          Return true if a expression aggregate node semantically equals the current node, or false if not.
protected  String getAggregationFunctionName()
          Returns the aggregation function name for representation in a generate expression string.
 MinMaxTypeEnum getMinMaxTypeEnum()
          Returns the indicator for minimum or maximum.
 AggregationMethod validateAggregationChild(StreamTypeService streamTypeService, MethodResolutionService methodResolutionService)
          Gives the aggregation node a chance to validate the sub-expression types.
 
Methods inherited from class net.esper.eql.expression.ExprAggregateNode
equalsNode, evaluate, getAggregatesBottomUp, getPrototypeAggregator, getType, isConstantResult, isDistinct, setAggregationResultFuture, toExpressionString, validate, validateSingleNumericChild
 
Methods inherited from class net.esper.eql.expression.ExprNode
accept, addChildNode, deepEquals, dumpDebug, getChildNodes, getValidatedSubtree, parseMappedProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExprMinMaxAggrNode

public ExprMinMaxAggrNode(boolean distinct,
                          MinMaxTypeEnum minMaxTypeEnum)
Ctor.

Parameters:
distinct - - indicator whether distinct values of all values min/max
minMaxTypeEnum - - enum for whether to minimum or maximum compute
Method Detail

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 stream
methodResolutionService - used for resolving method and function names
Returns:
aggregation function use
Throws:
ExprValidationException - when expression validation failed

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

getMinMaxTypeEnum

public MinMaxTypeEnum getMinMaxTypeEnum()
Returns the indicator for minimum or maximum.

Returns:
min/max indicator

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