presto-main/src/main/java/io/prestosql/sql/planner/optimizations/IndexJoinOptimizer.java/IndexSourceRewriter/visitAggregation
class IndexSourceRewriter:        @Override
        public PlanNode visitAggregation(AggregationNode node, RewriteContext<Context> context)
        {
            // Lookup symbols can only be passed through if they are part of the group by columns
            Set<Symbol> groupByLookupSymbols = context.get().getLookupSymbols().stream()
                    .filter(node.getGroupingKeys()::contains)
                    .collect(toImmutableSet());

            if (groupByLookupSymbols.isEmpty()) {
                return node;
            }

            return context.defaultRewrite(node, new Context(groupByLookupSymbols, context.get().getSuccess()));
        }