public abstract class WinAggResultContextImpl extends AggResultContextImpl implements WinAggResultContext
WinAggResultContext.| Constructor and Description |
|---|
WinAggResultContextImpl(BlockBuilder block,
List<Expression> accumulator,
com.google.common.base.Function<BlockBuilder,WinAggFrameResultContext> frameContextBuilder)
Creates window aggregate result context.
|
| Modifier and Type | Method and Description |
|---|---|
List<Expression> |
arguments(Expression rowIndex)
Returns Linq4j form of arguments.
|
Expression |
compareRows(Expression a,
Expression b)
Compares two rows given by absolute positions according to the order
collation of the current window.
|
Expression |
computeIndex(Expression offset,
WinAggImplementor.SeekType seekType)
Converts absolute index position of the given relative position.
|
Expression |
endIndex()
Returns the index of the very last row in partition.
|
Expression |
getFrameRowCount()
Returns the number of rows in the current frame (subject to framing
clause).
|
Expression |
getPartitionRowCount()
Returns the number of rows in the current partition (as determined by
PARTITION BY clause).
|
Expression |
hasRows()
Returns the boolean expression that tells if the partition has rows.
|
Expression |
index()
Returns the index of the current row in the partition.
|
Expression |
rowInFrame(Expression rowIndex)
Returns boolean the expression that checks if the given index is in
the frame bounds.
|
Expression |
rowInPartition(Expression rowIndex)
Returns boolean the expression that checks if the given index is in
the partition bounds.
|
RexToLixTranslator |
rowTranslator(Expression rowIndex)
Returns row translator for given absolute row position.
|
Expression |
startIndex()
Returns the index of the very first row in partition.
|
accumulatorcurrentBlock, currentNullables, exitBlock, nestBlock, nestBlock, nestBlockclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrexArgumentsaccumulatorcurrentBlock, currentNullables, exitBlock, nestBlock, nestBlock, nestBlockpublic WinAggResultContextImpl(BlockBuilder block, List<Expression> accumulator, com.google.common.base.Function<BlockBuilder,WinAggFrameResultContext> frameContextBuilder)
block - code block that will contain the added initializationaccumulator - accumulator variables that store the intermediate
aggregate statepublic final List<Expression> arguments(Expression rowIndex)
WinAggResultContextrowTranslator().translateList(rexArguments()).
This is handy if you need just operate on argument.arguments in interface WinAggResultContextrowIndex - index of the requested row. The index must be in range
of partition's startIndex and endIndex.public Expression computeIndex(Expression offset, WinAggImplementor.SeekType seekType)
WinAggFrameResultContextcomputeIndex in interface WinAggFrameResultContextoffset - offset of the requested rowseekType - the type of offset (start of window, end of window, etc)public Expression rowInFrame(Expression rowIndex)
WinAggFrameResultContextrowInFrame in interface WinAggFrameResultContextrowIndex - index if the row to checkpublic Expression rowInPartition(Expression rowIndex)
WinAggFrameResultContextrowInPartition in interface WinAggFrameResultContextrowIndex - index if the row to checkpublic RexToLixTranslator rowTranslator(Expression rowIndex)
WinAggFrameResultContextrowTranslator in interface WinAggFrameResultContextrowIndex - absolute index of the row.public Expression compareRows(Expression a, Expression b)
WinAggFrameResultContextcompareRows in interface WinAggFrameResultContexta - absolute index of the first rowb - absolute index of the second rowComparable.compareTo(T)public Expression index()
WinAggFrameContextWinAggFrameContext.startIndex() when you need zero-based row position.index in interface WinAggFrameContextpublic Expression startIndex()
WinAggFrameContextstartIndex in interface WinAggFrameContextpublic Expression endIndex()
WinAggFrameContextendIndex in interface WinAggFrameContextpublic Expression hasRows()
WinAggFrameContexthasRows in interface WinAggFrameContextpublic Expression getFrameRowCount()
WinAggFrameContextgetFrameRowCount in interface WinAggFrameContextpublic Expression getPartitionRowCount()
WinAggFrameContextgetPartitionRowCount in interface WinAggFrameContextCopyright © 2012–2015 The Apache Software Foundation. All rights reserved.