@Override
    public boolean matches(RelOptRuleCall call) {
      Join join = call.rel(1);
      RewritablePKFKJoinInfo joinInfo = HiveRelOptUtil.isRewritablePKFKJoin(
          join, join.getLeft(), join.getRight(), call.getMetadataQuery());
      if (!joinInfo.rewritable) {
        return false;
      }
      return super.matches(call);
    }
Rule that tries to push filter expressions into a join condition and into
the inputs of the join, iff the join is a column appending
non-filtering join.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveFilterJoinRule.java