Steve Carlin has posted comments on this change. ( http://gerrit.cloudera.org:8080/24217 )
Change subject: IMPALA-14911: Calcite planner: Fix boolean to numeric comparison ...................................................................... Patch Set 2: (1 comment) http://gerrit.cloudera.org:8080/#/c/24217/2/java/calcite-planner/src/main/java/org/apache/impala/calcite/type/ImpalaTypeCoercionImpl.java File java/calcite-planner/src/main/java/org/apache/impala/calcite/type/ImpalaTypeCoercionImpl.java: http://gerrit.cloudera.org:8080/#/c/24217/2/java/calcite-planner/src/main/java/org/apache/impala/calcite/type/ImpalaTypeCoercionImpl.java@123 PS2, Line 123: if (SqlTypeUtil.isBoolean(type1) && SqlTypeUtil.isNumeric(type2)) { > You are right, and my example does not hold. On the original planner both " I found some other problems which have now been corrected (and explained in the commit) and added e2e tests for them. But the Case problem was handled by the RexBuilder. As for the assert issue: I'm holding off on fixing that, but I will file a Jira for it. We shouldn't have the Decimal problem anymore, but if DOUBLE is a problem, that would be because Calcite needs to understand that this is ok. Calcite allows this through a datatype mapping rule which can be passed in at validation time. However, since it does pass right now, I don't want to complicate this Jira any further. The asserts are turned on though in the JUnit tests, so we can add the test there at a later date. -- To view, visit http://gerrit.cloudera.org:8080/24217 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I764dcbd2fd0d1323bfb964ed91d94cd3def594c0 Gerrit-Change-Number: 24217 Gerrit-PatchSet: 2 Gerrit-Owner: Steve Carlin <[email protected]> Gerrit-Reviewer: Aleksandr Efimov <[email protected]> Gerrit-Reviewer: Aman Sinha <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Jason Fehr <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Steve Carlin <[email protected]> Gerrit-Comment-Date: Mon, 24 Aug 2026 15:52:08 +0000 Gerrit-HasComments: Yes
