public static RexNode splitHiveJoinCondition(
      List<RelDataTypeField> sysFieldList,
      List<RelNode> inputs,
      RexNode condition,
      List<List<RexNode>> joinKeys,
      List<Integer> filterNulls,
      List<SqlOperator> rangeOp) throws CalciteSemanticException {
    final List<RexNode> nonEquiList = new ArrayList<>();

    splitJoinCondition(
        sysFieldList,
        inputs,
        condition,
        joinKeys,
        filterNulls,
        rangeOp,
        nonEquiList);

    // Convert the remainders into a list that are AND'ed together.
    return RexUtil.composeConjunction(
        inputs.get(0).getCluster().getRexBuilder(), nonEquiList, false);
  }
Splits out the equi-join (and optionally, a single non-equi) components
of a join condition, and returns what's left. Projection might be
required by the caller to provide join keys that are not direct field
references.

@param sysFieldList  list of system fields
@param inputs        join inputs
@param condition     join condition
@param joinKeys      The join keys from the inputs which are equi-join
                     keys
@param filterNulls   The join key positions for which null values will not
                     match. null values only match for the "is not distinct
                     from" condition.
@param rangeOp       if null, only locate equi-joins; otherwise, locate a
                     single non-equi join predicate and return its operator
                     in this list; join keys associated with the non-equi
                     join predicate are at the end of the key lists
                     returned
@return What's left, never null
@throws CalciteSemanticException
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveRelOptUtil.java