presto-main/src/main/java/io/prestosql/sql/planner/iterative/rule/PruneTopNColumns.java/PruneTopNColumns/pushDownProjectOff
class PruneTopNColumns:    @Override
    protected Optional<PlanNode> pushDownProjectOff(PlanNodeIdAllocator idAllocator, TopNNode topNNode, Set<Symbol> referencedOutputs)
    {
        Set<Symbol> prunedTopNInputs = Streams.concat(
                referencedOutputs.stream(),
                topNNode.getOrderingScheme().getOrderBy().stream())
                .collect(toImmutableSet());

        return restrictChildOutputs(idAllocator, topNNode, prunedTopNInputs);
    }