public abstract class WinAggResultContextImpl extends AggResultContextImpl implements WinAggResultContext
WinAggResultContext.| Modifier | Constructor and Description |
|---|---|
protected |
WinAggResultContextImpl(org.apache.calcite.linq4j.tree.BlockBuilder block,
List<org.apache.calcite.linq4j.tree.Expression> accumulator,
Function<org.apache.calcite.linq4j.tree.BlockBuilder,WinAggFrameResultContext> frameContextBuilder)
Creates window aggregate result context.
|
protected |
WinAggResultContextImpl(org.apache.calcite.linq4j.tree.BlockBuilder block,
List<org.apache.calcite.linq4j.tree.Expression> accumulator,
com.google.common.base.Function<org.apache.calcite.linq4j.tree.BlockBuilder,WinAggFrameResultContext> frameContextBuilder)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
List<org.apache.calcite.linq4j.tree.Expression> |
arguments(org.apache.calcite.linq4j.tree.Expression rowIndex)
Returns Linq4j form of arguments.
|
org.apache.calcite.linq4j.tree.Expression |
compareRows(org.apache.calcite.linq4j.tree.Expression a,
org.apache.calcite.linq4j.tree.Expression b)
Compares two rows given by absolute positions according to the order
collation of the current window.
|
org.apache.calcite.linq4j.tree.Expression |
computeIndex(org.apache.calcite.linq4j.tree.Expression offset,
WinAggImplementor.SeekType seekType)
Converts absolute index position of the given relative position.
|
org.apache.calcite.linq4j.tree.Expression |
endIndex()
Returns the index of the very last row in partition.
|
org.apache.calcite.linq4j.tree.Expression |
getFrameRowCount()
Returns the number of rows in the current frame (subject to framing
clause).
|
org.apache.calcite.linq4j.tree.Expression |
getPartitionRowCount()
Returns the number of rows in the current partition (as determined by
PARTITION BY clause).
|
org.apache.calcite.linq4j.tree.Expression |
hasRows()
Returns the boolean expression that tells if the partition has rows.
|
org.apache.calcite.linq4j.tree.Expression |
index()
Returns the index of the current row in the partition.
|
org.apache.calcite.linq4j.tree.Expression |
rowInFrame(org.apache.calcite.linq4j.tree.Expression rowIndex)
Returns boolean the expression that checks if the given index is in
the frame bounds.
|
org.apache.calcite.linq4j.tree.Expression |
rowInPartition(org.apache.calcite.linq4j.tree.Expression rowIndex)
Returns boolean the expression that checks if the given index is in
the partition bounds.
|
RexToLixTranslator |
rowTranslator(org.apache.calcite.linq4j.tree.Expression rowIndex)
Returns row translator for given absolute row position.
|
org.apache.calcite.linq4j.tree.Expression |
startIndex()
Returns the index of the very first row in partition.
|
call, key, keyFieldaccumulatorcurrentBlock, exitBlock, nestBlock, nestBlockclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrexArgumentscall, key, keyFieldaccumulatorcurrentBlock, exitBlock, nestBlock, nestBlockprotected WinAggResultContextImpl(org.apache.calcite.linq4j.tree.BlockBuilder block,
List<org.apache.calcite.linq4j.tree.Expression> accumulator,
Function<org.apache.calcite.linq4j.tree.BlockBuilder,WinAggFrameResultContext> frameContextBuilder)
block - code block that will contain the added initializationaccumulator - accumulator variables that store the intermediate
aggregate state@Deprecated protected WinAggResultContextImpl(org.apache.calcite.linq4j.tree.BlockBuilder block, List<org.apache.calcite.linq4j.tree.Expression> accumulator, com.google.common.base.Function<org.apache.calcite.linq4j.tree.BlockBuilder,WinAggFrameResultContext> frameContextBuilder)
public final List<org.apache.calcite.linq4j.tree.Expression> arguments(org.apache.calcite.linq4j.tree.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 org.apache.calcite.linq4j.tree.Expression computeIndex(org.apache.calcite.linq4j.tree.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 org.apache.calcite.linq4j.tree.Expression rowInFrame(org.apache.calcite.linq4j.tree.Expression rowIndex)
WinAggFrameResultContextrowInFrame in interface WinAggFrameResultContextrowIndex - index if the row to checkpublic org.apache.calcite.linq4j.tree.Expression rowInPartition(org.apache.calcite.linq4j.tree.Expression rowIndex)
WinAggFrameResultContextrowInPartition in interface WinAggFrameResultContextrowIndex - index if the row to checkpublic RexToLixTranslator rowTranslator(org.apache.calcite.linq4j.tree.Expression rowIndex)
WinAggFrameResultContextrowTranslator in interface WinAggFrameResultContextrowIndex - absolute index of the row.public org.apache.calcite.linq4j.tree.Expression compareRows(org.apache.calcite.linq4j.tree.Expression a,
org.apache.calcite.linq4j.tree.Expression b)
WinAggFrameResultContextcompareRows in interface WinAggFrameResultContexta - absolute index of the first rowb - absolute index of the second rowComparable.compareTo(T)public org.apache.calcite.linq4j.tree.Expression index()
WinAggFrameContextWinAggFrameContext.startIndex() when you need zero-based row position.index in interface WinAggFrameContextpublic org.apache.calcite.linq4j.tree.Expression startIndex()
WinAggFrameContextstartIndex in interface WinAggFrameContextpublic org.apache.calcite.linq4j.tree.Expression endIndex()
WinAggFrameContextendIndex in interface WinAggFrameContextpublic org.apache.calcite.linq4j.tree.Expression hasRows()
WinAggFrameContexthasRows in interface WinAggFrameContextpublic org.apache.calcite.linq4j.tree.Expression getFrameRowCount()
WinAggFrameContextgetFrameRowCount in interface WinAggFrameContextpublic org.apache.calcite.linq4j.tree.Expression getPartitionRowCount()
WinAggFrameContextgetPartitionRowCount in interface WinAggFrameContextCopyright © 2012-2022 Apache Software Foundation. All Rights Reserved.