Class ImplementOffset

java.lang.Object
io.trino.sql.planner.iterative.rule.ImplementOffset
All Implemented Interfaces:
Rule<OffsetNode>

public class ImplementOffset extends Object implements Rule<OffsetNode>
Transforms:
 - Offset (row count = x)
    - Source
 
Into:
 - Project (prune rowNumber symbol)
    - Filter (rowNumber > x)
       - RowNumber
          - Source
 
Relies on RowNumberNode's property of keeping order of its input. If the query contains an ORDER BY clause, the sorted order will be respected when leading rows are removed.