presto-main/src/main/java/io/prestosql/sql/planner/optimizations/ScalarAggregationToJoinRewriter.java/ScalarAggregationToJoinRewriter/getTruncatedAggregationSymbols
class ScalarAggregationToJoinRewriter:    private static List<Symbol> getTruncatedAggregationSymbols(CorrelatedJoinNode correlatedJoinNode, AggregationNode aggregationNode)
    {
        Set<Symbol> applySymbols = new HashSet<>(correlatedJoinNode.getOutputSymbols());
        return aggregationNode.getOutputSymbols().stream()
                .filter(applySymbols::contains)
                .collect(toImmutableList());
    }