mihaibudiu commented on code in PR #2855:
URL: https://github.com/apache/calcite/pull/2855#discussion_r1823005329


##########
core/src/main/java/org/apache/calcite/sql/validate/implicit/AbstractTypeCoercion.java:
##########
@@ -445,11 +445,15 @@ private RelDataType getTightestCommonTypeOrThrow(
     // 2. VARCHAR has 65536 as default precision.
     // 3. Following MS-SQL: BINARY or BOOLEAN can be casted to VARCHAR.
     if (SqlTypeUtil.isAtomic(type1) && SqlTypeUtil.isCharacter(type2)) {
-      resultType = factory.createSqlType(SqlTypeName.VARCHAR);
+      resultType =
+          
factory.createTypeWithNullability(factory.createSqlType(SqlTypeName.VARCHAR),

Review Comment:
   these changes are not really related to union.
   But this may be the right approach.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to