rubenada commented on a change in pull request #2555:
URL: https://github.com/apache/calcite/pull/2555#discussion_r719125001



##########
File path: 
core/src/main/java/org/apache/calcite/sql/type/SqlTypeCoercionRule.java
##########
@@ -202,7 +202,8 @@ private SqlTypeCoercionRule(Map<SqlTypeName, 
ImmutableSet<SqlTypeName>> map) {
         coerceRules.copyValues(SqlTypeName.BOOLEAN)
             .add(SqlTypeName.CHAR)
             .add(SqlTypeName.VARCHAR)
-            .addAll(SqlTypeName.NUMERIC_TYPES)
+            .addAll(SqlTypeName.INT_TYPES)
+            .addAll(SqlTypeName.APPROX_TYPES)

Review comment:
       IMO it makes sense, if we say that `DECIMAL` cannot be cast into 
`BOOLEAN`; consider the same for `FLOAT`, `REAL` and `DOUBLE`, I think it is a 
consistent approach.
   However, if we confirm to go in this direction:
   - It seems some test will need adjustments
   - The cast matrix in `reference.md` will need to be modified for those rows 
too.




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