xiedeyantu commented on code in PR #4653:
URL: https://github.com/apache/calcite/pull/4653#discussion_r2580973415


##########
core/src/main/java/org/apache/calcite/sql/validate/SqlConformanceEnum.java:
##########
@@ -478,6 +478,19 @@ public enum SqlConformanceEnum implements SqlConformance {
     }
   }
 
+  @Override public boolean nullableDivide() {
+    switch (this) {
+    // The following dialects use nullable divide:
+    // sqlite, postgres, duckdb, mysql and MariaDB (non-strict mode).  Note 
that MYSQL is actually
+    // dynamically-typed, so Calcite cannot implement its behavior accurately, 
since Calcite is
+    // statically-typed.
+    case MYSQL_5:

Review Comment:
   Should we make LENIENT support this new division behavior as Calcite's 
default? Because the current behavior is inconsistent with MySQL (although 
MySQL might be incorrect). I tried to verify this across several databases: 
PostgreSQL throws an error directly, while MariaDB, SQLite and MySQL behave 
consistently. DuckDB actually differs from both MySQL and the current 
implementation as well.



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