private Pair<Boolean,RexNode> getCombinedPredicateForJoin(Join j, RexNode additionalPredicate) {
    RexNode minusPred = RelMdUtil.minusPreds(j.getCluster().getRexBuilder(), additionalPredicate,
        j.getCondition());

    if (minusPred != null) {
      List<RexNode> minusList = new ArrayList<RexNode>();
      minusList.add(j.getCondition());
      minusList.add(minusPred);

      return new Pair<Boolean,RexNode>(false, minusPred);
    }

    return new Pair<Boolean,RexNode>(true,j.getCondition());
  }
@param j
@param additionalPredicate
@return if predicate is the join condition return (true, joinCond)
else return (false, minusPred)
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/stats/HiveRelMdSelectivity.java