private boolean isWidening(RelDataType type, RelDataType type1) {
    return type.getSqlTypeName() == type1.getSqlTypeName()
            && type.getPrecision() >= type1.getPrecision();
  }
Returns whether one type is just a widening of another.

<p>For example:<ul>
<li>{@code VARCHAR(10)} is a widening of {@code VARCHAR(5)}.
<li>{@code VARCHAR(10)} is a widening of {@code VARCHAR(10) NOT NULL}.
</ul>
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveRelDecorrelator.java