Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
mysql> select sum(x) filter (where x = 1) from t; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(where x = 1) from t' at line 1
See details in https://modern-sql.com/feature/filter
Calcite should not generate the agg() FILTER clause for the MySQL dialect. CALCITE-4321 introduced a way to convert the FILTER clause to an aggregation function with CASE.
Attachments
Issue Links
- depends upon
-
CALCITE-4321 JDBC adapter omits FILTER (WHERE ...) expressions when generating SQL
- Closed
- links to