Interface WinAggAddContext
-
- All Superinterfaces:
AggAddContext
,AggResetContext
,AggResultContext
,NestedBlockBuilder
,WinAggFrameContext
,WinAggFrameResultContext
,WinAggResultContext
- All Known Implementing Classes:
WinAggAddContextImpl
public interface WinAggAddContext extends AggAddContext, WinAggResultContext
Information for a call toAggImplementor.implementAdd(AggContext, AggAddContext)
.WinAggAddContext
is used when implementing windowed aggregate. Typically, the aggregation implementation will useAggAddContext.arguments()
orAggAddContext.rexArguments()
to update aggregate value.- See Also:
AggAddContext
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Expression
currentPosition()
Returns current position inside for-loop of window aggregate.-
Methods inherited from interface org.apache.calcite.adapter.enumerable.AggAddContext
arguments, rexArguments, rexFilterArgument, rowTranslator
-
Methods inherited from interface org.apache.calcite.adapter.enumerable.AggResetContext
accumulator
-
Methods inherited from interface org.apache.calcite.adapter.enumerable.AggResultContext
call, key, keyField
-
Methods inherited from interface org.apache.calcite.adapter.enumerable.NestedBlockBuilder
currentBlock, currentNullables, exitBlock, nestBlock, nestBlock, nestBlock
-
Methods inherited from interface org.apache.calcite.adapter.enumerable.WinAggFrameContext
endIndex, getFrameRowCount, getPartitionRowCount, hasRows, index, startIndex
-
Methods inherited from interface org.apache.calcite.adapter.enumerable.WinAggFrameResultContext
compareRows, computeIndex, rowInFrame, rowInPartition, rowTranslator
-
Methods inherited from interface org.apache.calcite.adapter.enumerable.WinAggResultContext
arguments, rexArguments
-
-
-
-
Method Detail
-
currentPosition
Expression currentPosition()
Returns current position inside for-loop of window aggregate. Note, the position is relative toWinAggFrameContext.startIndex()
. This is NOT current row as in "rows between current row". If you need to know the relative index of the current row in the partition, useWinAggFrameContext.index()
.- Returns:
- current position inside for-loop of window aggregate.
- See Also:
WinAggFrameContext.index()
,WinAggFrameContext.startIndex()
-
-