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
ConstructorDescriptionAggResultContextImpl
(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 Expression
key()
Expression by which to reference the key upon which the values in the accumulator were aggregated.keyField
(int i) Returns an expression that references thei
th field of the key, cast to the appropriate type.Returns aRexToLixTranslator
suitable to transform the result.Methods inherited from class org.apache.calcite.adapter.enumerable.impl.AggResetContextImpl
accumulator
Methods inherited from class org.apache.calcite.adapter.enumerable.NestedBlockBuilderImpl
currentBlock, exitBlock, nestBlock, nestBlock
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.calcite.adapter.enumerable.AggResetContext
accumulator
Methods 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:AggResultContext
Expression 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:
key
in interfaceAggResultContext
-
keyField
Description copied from interface:AggResultContext
Returns an expression that references thei
th field of the key, cast to the appropriate type.- Specified by:
keyField
in interfaceAggResultContext
-
call
Description copied from interface:AggResultContext
Returns the aggregate call.- Specified by:
call
in interfaceAggResultContext
- Overrides:
call
in classAggResetContextImpl
-
resultTranslator
Description copied from interface:AggResultContext
Returns aRexToLixTranslator
suitable to transform the result.- Specified by:
resultTranslator
in interfaceAggResultContext
-