private void checkWhereClauseForAggregates(CompiledValue compiledValue) {
    if (compiledValue instanceof CompiledAggregateFunction) {
      throw new QueryInvalidException(
          "Aggregate functions can not be used as part of the WHERE clause.");
    }

    // Inner queries are supported.
    if (compiledValue instanceof CompiledSelect) {
      return;
    }

    for (Object compiledChildren : compiledValue.getChildren()) {
      checkWhereClauseForAggregates((CompiledValue) compiledChildren);
    }
  }
Processes import statements only. This compiler instance remembers the imports and can be used
to compile other strings with this context info
geode-core/src/main/java/org/apache/geode/cache/query/internal/QCompiler.java