private RexNode transformIntoInClauseCondition(RexBuilder rexBuilder, RexNode condition,
            int minNumORClauses) throws SemanticException {
      assert condition.getKind() == SqlKind.OR;

      ImmutableList<RexNode> operands = RexUtil.flattenOr(((RexCall) condition).getOperands());
      if (operands.size() < minNumORClauses) {
        // We bail out
        return null;
      }
      List<ConstraintGroup> allNodes = new ArrayList<>();
      List<ConstraintGroup> processedNodes = new ArrayList<>();
      for (int i = 0; i < operands.size(); i++) {
        ConstraintGroup m = new ConstraintGroup(operands.get(i));
        allNodes.add(m);
      }

      Multimap<Set<RexNodeRef>, ConstraintGroup> assignmentGroups =
          Multimaps.index(allNodes, cg -> cg.key);

      for (Entry<Set<RexNodeRef>, Collection<ConstraintGroup>> sa : assignmentGroups.asMap().entrySet()) {
        // skip opaque
        if (sa.getKey().isEmpty()) {
          continue;
        }
        // not enough equalities should not be handled
        if (sa.getValue().size() < 2 || sa.getValue().size() < minNumORClauses) {
          continue;
        }

        allNodes.add(new ConstraintGroup(buildInFor(sa.getKey(), sa.getValue())));
        processedNodes.addAll(sa.getValue());
      }

      if (processedNodes.isEmpty()) {
        return null;
      }
      allNodes.removeAll(processedNodes);
      List<RexNode> ops = new ArrayList<>();
      for (ConstraintGroup mx : allNodes) {
        ops.add(mx.originalRexNode);
      }
      if (ops.size() == 1) {
        return ops.get(0);
      } else {
        return rexBuilder.makeCall(SqlStdOperatorTable.OR, ops);
      }

    }
A group of Constraints.

Examples:
 (a=1 && b=1)
 (a=1)

Note: any rexNode is accepted as constraint; but it might be keyed with the empty key;
which means it can't be parsed as a constraint for some reason; but for completeness...
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HivePointLookupOptimizerRule.java