presto-main/src/main/java/io/prestosql/cost/SortStatsRule.java/SortStatsRule/calculate
class SortStatsRule:    @Override
    public Optional<PlanNodeStatsEstimate> calculate(SortNode node, StatsProvider sourceStats, Lookup lookup, Session session, TypeProvider types)
    {
        return Optional.of(sourceStats.getStats(node.getSource()));
    }