private static RexNode createResultFromEmptySet(RexBuilder rexBuilder,
        RexNode ref, Multimap<RexNode, RexNode> inLHSExprToRHSNullableExprs) {
      if (inLHSExprToRHSNullableExprs.containsKey(ref)) {
        // We handle possible null values in the expressions.
        List<RexNode> nullableExprs =
            inLHSExprToRHSNullableExprs.get(ref)
                .stream()
                .map(n -> rexBuilder.makeCall(SqlStdOperatorTable.IS_NULL, ImmutableList.of(n)))
                .collect(Collectors.toList());
        return RexUtil.composeConjunction(rexBuilder,
            ImmutableList.of(
                RexUtil.composeDisjunction(rexBuilder, nullableExprs, false),
                rexBuilder.makeNullLiteral(rexBuilder.getTypeFactory().createSqlType(SqlTypeName.BOOLEAN))),
            false);
      }
      return rexBuilder.makeLiteral(false);
    }
Check if the type of nodes in the two collections is homogeneous within the collections
and identical between them.
@param nodes1 the first collection of nodes
@param nodes2 the second collection of nodes
@return true if nodes in both collections is unique and identical, false otherwise
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HivePointLookupOptimizerRule.java