strongduanmu commented on code in PR #4411:
URL: https://github.com/apache/calcite/pull/4411#discussion_r2136728202


##########
core/src/main/java/org/apache/calcite/sql/type/SqlTypeAssignmentRule.java:
##########
@@ -70,33 +70,73 @@ private SqlTypeAssignmentRule(
     // TINYINT is assignable from...
     rules.add(SqlTypeName.TINYINT, EnumSet.of(SqlTypeName.TINYINT));
 
+    // UTINYINT is assignable from...
+    rules.add(SqlTypeName.UTINYINT, EnumSet.of(SqlTypeName.UTINYINT));
+
     // SMALLINT is assignable from...
     rule.clear();
     rule.add(SqlTypeName.TINYINT);
+    rule.add(SqlTypeName.UTINYINT);
     rule.add(SqlTypeName.SMALLINT);
     rules.add(SqlTypeName.SMALLINT, rule);
 
+    // USMALLINT is assignable from...
+    rule.clear();
+    rule.add(SqlTypeName.UTINYINT);
+    rule.add(SqlTypeName.TINYINT);

Review Comment:
   Other UNSIGNED types may have similar problems, not considering the scenario 
of negative numbers.



-- 
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