@Test
  @Parameters({"MIN", "MAX", "AVG", "SUM", "COUNT"})
  public void parsingShouldSucceedWhenAggregatesAreUsedAsPartOfTheWhereClauseWithinAnInnerSelectQuery(
      String function) {
    String[] queries = new String[] {
        "SELECT * FROM " + SEPARATOR + "region WHERE id IN (SELECT " + function + "(id) FROM "
            + SEPARATOR + "region)",
        "SELECT COUNT(id), status FROM " + SEPARATOR + "region WHERE id IN (SELECT " + function
            + "(id) FROM " + SEPARATOR + "region) GROUP BY status",

        "SELECT * FROM " + SEPARATOR + "region WHERE id = ELEMENT(SELECT " + function + "(id) FROM "
            + SEPARATOR + "region)",
        "SELECT * FROM " + SEPARATOR + "region WHERE id < ELEMENT(SELECT " + function + "(id) FROM "
            + SEPARATOR + "region)",
        "SELECT * FROM " + SEPARATOR + "region WHERE id > ELEMENT(SELECT " + function + "(id) FROM "
            + SEPARATOR + "region)",
        "SELECT * FROM " + SEPARATOR + "region WHERE id <> ELEMENT(SELECT " + function
            + "(id) FROM " + SEPARATOR + "region)",

        "SELECT COUNT(id), status FROM " + SEPARATOR + "region WHERE id = ELEMENT(SELECT "
            + function
            + "(id) FROM " + SEPARATOR + "region) GROUP BY status",
        "SELECT COUNT(id), status FROM " + SEPARATOR + "region WHERE id < ELEMENT(SELECT "
            + function
            + "(id) FROM " + SEPARATOR + "region) GROUP BY status",
        "SELECT COUNT(id), status FROM " + SEPARATOR + "region WHERE id > ELEMENT(SELECT "
            + function
            + "(id) FROM " + SEPARATOR + "region) GROUP BY status",
        "SELECT COUNT(id), status FROM " + SEPARATOR + "region WHERE id <> ELEMENT(SELECT "
            + function
            + "(id) FROM " + SEPARATOR + "region) GROUP BY status",
    };

    for (String queryString : queries) {
      QCompiler compiler = new QCompiler();
      assertThatCode(() -> compiler.compileQuery(queryString))
          .as(String.format("Query parsing failed for %s but should have succeeded.", queryString))
          .doesNotThrowAnyException();
    }
  }
This test is no more valid. From 6.6 Like is enhanced to support special chars (% and _) at any
place in the string pattern. With this the Like predicate is not transformed to
compiled-junction with > and < operator.
geode-core/src/test/java/org/apache/geode/cache/query/internal/QCompilerTest.java