Interface SqlStaticAggFunction


public interface SqlStaticAggFunction
Aggregate function whose value may be a constant expression, based on only the contents of the GROUP BY clause.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable RexNode
    constant(RexBuilder rexBuilder, ImmutableBitSet groupSet, com.google.common.collect.ImmutableList<ImmutableBitSet> groupSets, AggregateCall aggregateCall)
    Generates an expression for the aggregate function; or null if the value is not constant.
  • Method Details

    • constant

      @Nullable RexNode constant(RexBuilder rexBuilder, ImmutableBitSet groupSet, com.google.common.collect.ImmutableList<ImmutableBitSet> groupSets, AggregateCall aggregateCall)
      Generates an expression for the aggregate function; or null if the value is not constant.

      For example:

      • GROUPING(deptno) expands to literal 1 if the aggregate has GROUP BY deptno
      Parameters:
      rexBuilder - Rex builder
      groupSet - Group set
      groupSets - Group sets
      aggregateCall - Aggregate call
      Returns:
      Expression for single row