Package org.apache.calcite.sql
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 TypeMethodDescription@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 literal0
if the aggregate hasGROUP BY deptno
- Parameters:
rexBuilder
- Rex buildergroupSet
- Group setgroupSets
- Group setsaggregateCall
- Aggregate call- Returns:
- Expression for single row
-