Class AggResultContextImpl
java.lang.Object
org.apache.calcite.adapter.enumerable.NestedBlockBuilderImpl
org.apache.calcite.adapter.enumerable.impl.AggResetContextImpl
org.apache.calcite.adapter.enumerable.impl.AggResultContextImpl
- All Implemented Interfaces:
AggResetContext,AggResultContext,NestedBlockBuilder
- Direct Known Subclasses:
AggAddContextImpl,WinAggResultContextImpl
Implementation of
AggResultContext.-
Constructor Summary
ConstructorsConstructorDescriptionAggResultContextImpl(BlockBuilder block, @Nullable AggregateCall call, List<Expression> accumulator, @Nullable ParameterExpression key, @Nullable PhysType keyPhysType) Creates aggregate result context. -
Method Summary
Modifier and TypeMethodDescriptioncall()Returns the aggregate call.@Nullable Expressionkey()Expression by which to reference the key upon which the values in the accumulator were aggregated.keyField(int i) Returns an expression that references theith field of the key, cast to the appropriate type.Returns aRexToLixTranslatorsuitable to transform the result.Methods inherited from class org.apache.calcite.adapter.enumerable.impl.AggResetContextImpl
accumulatorMethods inherited from class org.apache.calcite.adapter.enumerable.NestedBlockBuilderImpl
currentBlock, exitBlock, nestBlock, nestBlockMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.calcite.adapter.enumerable.AggResetContext
accumulatorMethods inherited from interface org.apache.calcite.adapter.enumerable.NestedBlockBuilder
currentBlock, exitBlock, nestBlock, nestBlock
-
Constructor Details
-
AggResultContextImpl
public AggResultContextImpl(BlockBuilder block, @Nullable AggregateCall call, List<Expression> accumulator, @Nullable ParameterExpression key, @Nullable PhysType keyPhysType) Creates aggregate result context.- Parameters:
block- Code block that will contain the result calculation statementscall- Aggregate callaccumulator- Accumulator variables that store the intermediate aggregate statekey- Key
-
-
Method Details
-
key
Description copied from interface:AggResultContextExpression by which to reference the key upon which the values in the accumulator were aggregated. Most aggregate functions depend on only the accumulator, but quasi-aggregate functions such as GROUPING access at the key.- Specified by:
keyin interfaceAggResultContext
-
keyField
Description copied from interface:AggResultContextReturns an expression that references theith field of the key, cast to the appropriate type.- Specified by:
keyFieldin interfaceAggResultContext
-
call
Description copied from interface:AggResultContextReturns the aggregate call.- Specified by:
callin interfaceAggResultContext- Overrides:
callin classAggResetContextImpl
-
resultTranslator
Description copied from interface:AggResultContextReturns aRexToLixTranslatorsuitable to transform the result.- Specified by:
resultTranslatorin interfaceAggResultContext
-