public void optimize(PinotQuery pinotQuery, @Nullable Schema schema) {
    optimize(pinotQuery, null, schema);
  }
@Test
  public void testMergeTextMatchFilter() {
    String query =
        "SELECT * FROM testTable WHERE TEXT_MATCH(string, 'foo') AND TEXT_MATCH(string, 'bar') OR TEXT_MATCH(string, "
            + "'baz')";
    PinotQuery pinotQuery = CalciteSqlParser.compileToPinotQuery(query);
    OPTIMIZER.optimize(pinotQuery, SCHEMA);
    Function filterFunction = pinotQuery.getFilterExpression().getFunctionCall();
    assertEquals(filterFunction.getOperator(), FilterKind.TEXT_MATCH.name());
    List<Expression> operands = filterFunction.getOperands();
    assertEquals(operands.size(), 2);
    assertEquals(operands.get(0), RequestUtils.getIdentifierExpression("string"));
    assertEquals(operands.get(1), RequestUtils.getLiteralExpression("((foo AND bar) OR baz)"));
  }