presto-main/src/main/java/io/prestosql/sql/planner/iterative/rule/PruneIndexSourceColumns.java/PruneIndexSourceColumns/pushDownProjectOff
class PruneIndexSourceColumns:    @Override
    protected Optional<PlanNode> pushDownProjectOff(PlanNodeIdAllocator idAllocator, IndexSourceNode indexSourceNode, Set<Symbol> referencedOutputs)
    {
        Set<Symbol> prunedLookupSymbols = indexSourceNode.getLookupSymbols().stream()
                .filter(referencedOutputs::contains)
                .collect(toImmutableSet());

        Map<Symbol, ColumnHandle> prunedAssignments = Maps.filterEntries(
                indexSourceNode.getAssignments(),
                entry -> referencedOutputs.contains(entry.getKey()) ||
                        tupleDomainReferencesColumnHandle(indexSourceNode.getCurrentConstraint(), entry.getValue()));

        List<Symbol> prunedOutputList =
                indexSourceNode.getOutputSymbols().stream()
                        .filter(referencedOutputs::contains)
                        .collect(toImmutableList());

        return Optional.of(
                new IndexSourceNode(
                        indexSourceNode.getId(),
                        indexSourceNode.getIndexHandle(),
                        indexSourceNode.getTableHandle(),
                        prunedLookupSymbols,
                        prunedOutputList,
                        prunedAssignments,
                        indexSourceNode.getCurrentConstraint()));
    }