presto-main/src/main/java/io/prestosql/sql/planner/optimizations/QueryCardinalityUtil.java/QueryCardinalityUtil/visitOffset
class QueryCardinalityUtil:        @Override
        public Range<Long> visitOffset(OffsetNode node, Void context)
        {
            Range<Long> sourceCardinalityRange = node.getSource().accept(this, null);

            long lower = max(sourceCardinalityRange.lowerEndpoint() - node.getCount(), 0L);

            if (sourceCardinalityRange.hasUpperBound()) {
                return Range.closed(lower, max(sourceCardinalityRange.upperEndpoint() - node.getCount(), 0L));
            }
            else {
                return Range.atLeast(lower);
            }
        }