Class AggregateFunctionInvocation

java.lang.Object
io.substrait.expression.AggregateFunctionInvocation
Direct Known Subclasses:
ImmutableAggregateFunctionInvocation

@Immutable public abstract class AggregateFunctionInvocation extends Object
Represents an aggregate function invocation, including its declaration, arguments, options, aggregation phase, sort fields, output type, and invocation semantics.
  • Constructor Details

    • AggregateFunctionInvocation

      public AggregateFunctionInvocation()
  • Method Details

    • declaration

      public abstract SimpleExtension.AggregateFunctionVariant declaration()
      Returns the aggregate function variant declaration.
      Returns:
      the function variant declaration
    • arguments

      public abstract List<FunctionArg> arguments()
      Returns the ordered list of function arguments.
      Returns:
      list of function arguments
    • options

      public abstract List<FunctionOption> options()
      Returns the options applied to this aggregate function.
      Returns:
      list of function options
    • aggregationPhase

      public abstract Expression.AggregationPhase aggregationPhase()
      Returns the aggregation phase (e.g., initial, intermediate, final).
      Returns:
      aggregation phase
    • sort

      public abstract List<Expression.SortField> sort()
      Returns the sort fields applied to this invocation, if any.
      Returns:
      list of sort fields
    • outputType

      public abstract Type outputType()
      Returns the output type produced by this invocation.
      Returns:
      the output type
    • getType

      public Type getType()
      Returns the type of this invocation (same as outputType()).
      Returns:
      the output type
    • invocation

      public abstract Expression.AggregationInvocation invocation()
      Returns the aggregation invocation semantics (e.g., aggregate, merge).
      Returns:
      aggregation invocation
    • check

      @Check protected void check()
      Validates that variadic arguments satisfy the parameter consistency requirement. When CONSISTENT, all variadic arguments must have the same type (ignoring nullability). When INCONSISTENT, arguments can have different types.
      Throws:
      IllegalArgumentException - if validation fails
    • builder

      Creates a builder for AggregateFunctionInvocation.
      Returns:
      a new immutable builder