thomasrebele commented on code in PR #4505:
URL: https://github.com/apache/calcite/pull/4505#discussion_r2485708521


##########
core/src/main/java/org/apache/calcite/plan/Strong.java:
##########
@@ -356,7 +358,8 @@ private static Map<SqlKind, Policy> createPolicyMap() {
     map.put(SqlKind.CHECKED_TIMES, Policy.ANY);
     map.put(SqlKind.CHECKED_DIVIDE, Policy.ANY);
 
-    map.put(SqlKind.DIVIDE, Policy.ANY);
+    // DIVIDE behaves like ANY. However, (x/0) IS (NOT) NULL may not be 
simplified.

Review Comment:
   What I meant is this: DIVIDE is null iff any of its arguments is null. If 
the divisor is zero we get an exception. If we simplify an `IS NULL (x/0)` the 
simplified expression would not throw the exception anymore. The goal of the 
ticket was to fix this. It is not related to other dialects.



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