@Override
  public boolean matches(RelOptRuleCall call) {
    Filter filter = call.rel(0);
    Join   join = call.rel(1);
    HiveJdbcConverter   conv1 = call.rel(2);
    HiveJdbcConverter   conv2 = call.rel(3);

    if (!conv1.getJdbcDialect().equals(conv2.getJdbcDialect())) {
      return false;
    }

    boolean visitorRes = JDBCRexCallValidator.isValidJdbcOperation(filter.getCondition(), conv1.getJdbcDialect());
    if (visitorRes) {
      return JDBCRexCallValidator.isValidJdbcOperation(join.getCondition(), conv1.getJdbcDialect());
    }
    return false;
  }
Rule that tries to push filter expressions into a join condition and into
the inputs of the join.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/jdbc/JDBCFilterJoinRule.java