Class AggregatorNode

Direct Known Subclasses:
AvgAggregator, CountAggregator, MaxAggregator, MinAggregator, StandardDeviationAggregator, SumAggregator, XorAggregator

public abstract class AggregatorNode extends GroupingExpression
This class represents an aggregated value in a GroupingExpression. Because it operates on a list of data, it can not be used as a document-level expression (i.e. level 0, see GroupingExpression.resolveLevel(int)). The contained expression is evaluated at the level of the aggregator minus 1.
Author:
Simon Thoresen Hult
  • Constructor Details

  • Method Details

    • getExpression

      public GroupingExpression getExpression()
      Returns the expression that this node aggregates on.
      Returns:
      The expression.
    • resolveLevel

      public void resolveLevel(int level)
      Description copied from class: GroupingExpression
      Resolves the conceptual level of this expression. This level represents the type of data that is consumed by this expression, where level 0 is a single hit, level 1 is a group, level 2 is a list of groups, and so forth. This method verifies the input level against the expression type, and recursively resolves the level of all argument expressions.
      Overrides:
      resolveLevel in class GroupingExpression
      Parameters:
      level - The level of the input data.
    • visit

      public void visit(ExpressionVisitor visitor)
      Description copied from class: GroupingExpression
      Recursively calls ExpressionVisitor.visitExpression(GroupingExpression) for this expression and all of its argument expressions.
      Overrides:
      visit in class GroupingExpression
      Parameters:
      visitor - The visitor to call.