protected boolean containsAggregates(List<Expression> exprs) {
            for (Expression expr : exprs) {
                if (expr.collectFirst(e -> e instanceof AggregateExpression ? e : null) != null) {
                    return true;
                }
            }
            return false;
        }
Turns projections that contain aggregate expressions into aggregations.
indexr-query-opt/src/main/java/io/indexr/query/Analyzer.java