Interface WinAggAddContext
- All Superinterfaces:
AggAddContext
,AggResetContext
,AggResultContext
,NestedBlockBuilder
,WinAggFrameContext
,WinAggFrameResultContext
,WinAggResultContext
- All Known Implementing Classes:
WinAggAddContextImpl
Information for a call to
AggImplementor.implementAdd(AggContext, AggAddContext)
.
WinAggAddContext
is used when implementing windowed aggregate.
Typically, the aggregation implementation will use AggAddContext.arguments()
or AggAddContext.rexArguments()
to update aggregate value.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns 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, resultTranslator
Methods inherited from interface org.apache.calcite.adapter.enumerable.NestedBlockBuilder
currentBlock, exitBlock, 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 Details
-
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:
-