Interface WinAggFrameResultContext
- All Superinterfaces:
WinAggFrameContext
- All Known Subinterfaces:
WinAggAddContext
,WinAggResultContext
- All Known Implementing Classes:
WinAggAddContextImpl
,WinAggResultContextImpl
Provides information on the current window when computing the result of
the aggregation.
-
Method Summary
Modifier and TypeMethodDescriptioncompareRows
(Expression a, Expression b) Compares two rows given by absolute positions according to the order collation of the current window.computeIndex
(Expression offset, WinAggImplementor.SeekType seekType) Converts absolute index position of the given relative position.rowInFrame
(Expression rowIndex) Returns boolean the expression that checks if the given index is in the frame bounds.rowInPartition
(Expression rowIndex) Returns boolean the expression that checks if the given index is in the partition bounds.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 Details
-
computeIndex
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
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
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
Returns row translator for given absolute row position.- Parameters:
rowIndex
- absolute index of the row.- Returns:
- translator for the requested row
-
compareRows
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)
-