public static List<RexNode> fixNullability(final RexBuilder rexBuilder,
      List<RexNode> nodes, final List<RelDataType> fieldTypes) {
    return new FixNullabilityShuttle(rexBuilder, fieldTypes).apply(nodes);
  }
Fixes up the type of all {@link RexInputRef}s in an
expression to match differences in nullability.

This can be useful in case a field is inferred to be not nullable,
e.g., a not null literal, and the reference to the row type needs
to be changed to adjust the nullability flag.

In case of references created on top of a Calcite schema generated
directly from a Hive schema, this is especially useful since Hive
does not have a notion of nullability so all fields in the schema
will be inferred to nullable. However, Calcite makes this distinction.

<p>Throws if there any greater inconsistencies of type.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveCalciteUtil.java