private String toProjection(Expression expression) {
    if (Visitors.isAggregationCall(expression)) {
      Call aggregation = Visitors.toCall(expression);
      return String.format("%s(%s)", aggregation.operator().name(), toProjection(aggregation.arguments().get(0)));
    }

    return pathNaming().name((Path) expression);
  }
Don't generate queries with bind variables, use literals instead (careful with OQL injection)
criteria/geode/src/org/immutables/criteria/geode/OqlGenerator.java