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
public class AggResultContextImpl extends AggResetContextImpl implements AggResultContext
Implementation ofAggResultContext
-
-
Field Summary
Fields Modifier and Type Field Description private AggregateCall
call
private ParameterExpression
key
private PhysType
keyPhysType
-
Constructor Summary
Constructors Constructor Description AggResultContextImpl(BlockBuilder block, AggregateCall call, java.util.List<Expression> accumulator, ParameterExpression key, PhysType keyPhysType)
Creates aggregate result context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AggregateCall
call()
Expression
key()
Expression by which to reference the key upon which the values in the accumulator were aggregated.Expression
keyField(int i)
Returns an expression that references thei
th field of the key, cast to the appropriate type.-
Methods inherited from class org.apache.calcite.adapter.enumerable.impl.AggResetContextImpl
accumulator
-
Methods inherited from class org.apache.calcite.adapter.enumerable.NestedBlockBuilderImpl
currentBlock, currentNullables, exitBlock, nestBlock, 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, currentNullables, exitBlock, nestBlock, nestBlock, nestBlock
-
-
-
-
Field Detail
-
call
private final AggregateCall call
-
key
private final ParameterExpression key
-
keyPhysType
private final PhysType keyPhysType
-
-
Constructor Detail
-
AggResultContextImpl
public AggResultContextImpl(BlockBuilder block, AggregateCall call, java.util.List<Expression> accumulator, ParameterExpression key, 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 Detail
-
key
public Expression 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
public Expression keyField(int i)
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
public AggregateCall call()
- Specified by:
call
in interfaceAggResultContext
- Overrides:
call
in classAggResetContextImpl
-
-