Package io.trino.operator.window.pattern
Class LogicalIndexNavigation
- java.lang.Object
-
- io.trino.operator.window.pattern.LogicalIndexNavigation
-
public class LogicalIndexNavigation extends Object
-
-
Constructor Summary
Constructors Constructor Description LogicalIndexNavigation(Set<Integer> labels, boolean last, boolean running, int logicalOffset, int physicalOffset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intresolvePosition(int currentRow, ArrayView matchedLabels, int partitionStart, int partitionEnd, int patternStart)This method is used when computing row pattern measures and SKIP TO position after finding a match.intresolvePosition(ArrayView matchedLabels, int newLabel, int partitionStart, int partitionEnd, int patternStart)This method is used for resolving positions during pattern matching.
-
-
-
Method Detail
-
resolvePosition
public int resolvePosition(ArrayView matchedLabels, int newLabel, int partitionStart, int partitionEnd, int patternStart)
This method is used for resolving positions during pattern matching. The `newLabel` is the label currently being matched. For the purpose of match evaluation, the new label is considered as matched in the next position after all `matchedLabels`.- Returns:
- position within partition, or -1 if matching position was not found
-
resolvePosition
public int resolvePosition(int currentRow, ArrayView matchedLabels, int partitionStart, int partitionEnd, int patternStart)This method is used when computing row pattern measures and SKIP TO position after finding a match. Array of matched labels is complete. Search is limited up to the current row in case of running semantics and to the entire match in case of final semantics.- Returns:
- position within partition, or -1 if matching position was not found
-
-