presto-main/src/main/java/io/prestosql/sql/planner/iterative/rule/ImplementOffset.java/ImplementOffset/apply
class ImplementOffset:    @Override
    public Result apply(OffsetNode parent, Captures captures, Context context)
    {
        Symbol rowNumberSymbol = context.getSymbolAllocator().newSymbol("row_number", BIGINT);

        RowNumberNode rowNumberNode = new RowNumberNode(
                context.getIdAllocator().getNextId(),
                parent.getSource(),
                ImmutableList.of(),
                rowNumberSymbol,
                Optional.empty(),
                Optional.empty());

        FilterNode filterNode = new FilterNode(
                context.getIdAllocator().getNextId(),
                rowNumberNode,
                new ComparisonExpression(
                        ComparisonExpression.Operator.GREATER_THAN,
                        rowNumberSymbol.toSymbolReference(),
                        new GenericLiteral("BIGINT", Long.toString(parent.getCount()))));

        ProjectNode projectNode = new ProjectNode(
                context.getIdAllocator().getNextId(),
                filterNode,
                Assignments.identity(parent.getOutputSymbols()));

        return Result.ofPlanNode(projectNode);
    }