You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2021/09/29 16:33:12 UTC

[GitHub] [calcite] rubenada commented on a change in pull request #2555: [CALCITE-4777]Casting from DECIMAL to BOOLEAN throws an exception

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



##########
File path: core/src/test/java/org/apache/calcite/sql/test/SqlOperatorBaseTest.java
##########
@@ -1595,6 +1598,17 @@ protected static Calendar getCalendarNotTooNear(int timeUnit) {
     tester.checkFails(
         "cast(cast('blah' as varchar(10)) as boolean)", INVALID_CHAR_MESSAGE,
         true);
+
+    tester.checkBoolean("cast(0 as boolean)", false);

Review comment:
       For consistency, it should be `Boolean.FALSE` instead of `false`




-- 
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: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org