Interface WinAggFrameResultContext
-
- All Superinterfaces:
WinAggFrameContext
- All Known Subinterfaces:
WinAggAddContext
,WinAggResultContext
- All Known Implementing Classes:
WinAggAddContextImpl
,WinAggResultContextImpl
public interface WinAggFrameResultContext extends WinAggFrameContext
Provides information on the current window when computing the result of the aggregation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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
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.-
Methods inherited from interface org.apache.calcite.adapter.enumerable.WinAggFrameContext
endIndex, getFrameRowCount, getPartitionRowCount, hasRows, index, startIndex
-
-
-
-
Method Detail
-
computeIndex
Expression computeIndex(Expression offset, WinAggImplementor.SeekType seekType)
Converts absolute index position of the given relative position.- Parameters:
offset
- offset of the requested rowseekType
- the type of offset (start of window, end of window, etc)- Returns:
- absolute position of the requested row
-
rowInFrame
Expression rowInFrame(Expression rowIndex)
Returns boolean the expression that checks if the given index is in the frame bounds.- Parameters:
rowIndex
- index if the row to check- Returns:
- expression that validates frame bounds for the given index
-
rowInPartition
Expression rowInPartition(Expression rowIndex)
Returns boolean the expression that checks if the given index is in the partition bounds.- Parameters:
rowIndex
- index if the row to check- Returns:
- expression that validates partition bounds for the given index
-
rowTranslator
RexToLixTranslator rowTranslator(Expression rowIndex)
Returns row translator for given absolute row position.- Parameters:
rowIndex
- absolute index of the row.- Returns:
- translator for the requested row
-
compareRows
Expression compareRows(Expression a, Expression b)
Compares two rows given by absolute positions according to the order collation of the current window.- Parameters:
a
- absolute index of the first rowb
- absolute index of the second row- Returns:
- result of comparison as as in
Comparable.compareTo(T)
-
-