private RexNode transformIntoOrAndClause(RexBuilder rexBuilder, RexCall expression) {
      assert HiveIn.INSTANCE.equals(expression.op);

      if (expression.getOperands().get(0).getKind() != SqlKind.ROW) {
        // Nothing to do, return expression
        return expression;
      }

      final List<RexNode> disjuncts = RexNodeConverter.transformInToOrOperands(
          expression.getOperands(), rexBuilder);
      if (disjuncts == null) {
        // We could not execute transformation, return expression
        return expression;
      }

      if (disjuncts.size() > 1) {
        return rexBuilder.makeCall(SqlStdOperatorTable.OR, disjuncts);
      } else {
        return disjuncts.get(0);
      }
    }
Transforms IN clauses into OR/AND clauses, when possible.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/jdbc/JDBCExpandExpressionsRule.java