@SuppressWarnings("rawtypes")
    @Override
    public Expression<?> visit(Operation<?> expr, Context context) {
        Expression<?>[] args = new Expression<?>[expr.getArgs().size()];
        for (int i = 0; i < args.length; i++) {
            Context c = new Context();
            args[i] = expr.getArg(i).accept(this, c);
            context.add(c);
        }
        if (context.replace) {
            if (expr.getType().equals(Boolean.class)) {
                Predicate predicate = ExpressionUtils.predicate(expr.getOperator(), args);
                return !context.paths.isEmpty() ? exists(context, predicate) : predicate;
            } else {
                return ExpressionUtils.operation(expr.getType(), expr.getOperator(), args);
            }
        } else {
            return expr;
        }
    }
{@code CollectionAnyVisitor} is an expression visitor which transforms any() path expressions which are
often transformed into subqueries

@author tiwe
querydsl-core/src/main/java/com/querydsl/core/support/CollectionAnyVisitor.java