public static RexNode pushPastProjectUnlessBloat(RexNode node, Project project, int bloat) {
    if (Bug.CALCITE_6513_FIXED) {
      throw new IllegalStateException("Method is redundant when the fix for CALCITE-6513 is merged into Calcite. " +
          "Use RelOptUtil.pushPastProjectUnlessBloat");
    }

    List<RexNode> newConditions =
        RelOptUtil.pushPastProjectUnlessBloat(Collections.singletonList(node), project, bloat);
    if (newConditions == null || newConditions.size() != 1) {
      return null;
    }
    return newConditions.get(0);
  }
Returns a triple where first value represents whether we could extract a FK-PK join
or not, the second value is a pair with the column from left and right input that
are used for the FK-PK join, and the third value are the predicates that are not
part of the FK-PK condition. Currently we can only extract one FK-PK join.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveRelOptUtil.java