private List<?> project(QueryMetadata metadata, List<Expression<?>> sources, List<?> list) {
        Expression<?> projection = metadata.getProjection();
        Operator aggregator = null;
        if (projection instanceof Operation && Ops.aggOps.contains(((Operation) projection).getOperator())) {
            Operation<?> aggregation = (Operation<?>) projection;
            aggregator = aggregation.getOperator();
            projection = aggregation.getArg(0);
        }
        Evaluator projectionEvaluator = evaluatorFactory.create(metadata, sources, projection);
        EvaluatorFunction<Object, Object> transformer = new EvaluatorFunction(projectionEvaluator);
        List target = list.stream().map(transformer).collect(Collectors.toList());
        if (aggregator != null) {
            return Collections.singletonList(CollQueryFunctions.aggregate(target, projection, aggregator));
        } else {
            return target;
        }
    }
Default implementation of the {@link QueryEngine} interface

@author tiwe
querydsl-collections/src/main/java/com/querydsl/collections/DefaultQueryEngine.java