[ https://issues.apache.org/jira/browse/CALCITE-6306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
hongyu guo resolved CALCITE-6306. --------------------------------- Fix Version/s: 1.37.0 Assignee: hongyu guo Resolution: Fixed Fixed in [2ce30626|https://github.com/apache/calcite/commit/2ce306263327a30255bda858ce437c184546ca9b]. > JDBC adapter should not generate FILTER (WHERE) in MySQL and StarRocks dialect > ------------------------------------------------------------------------------ > > Key: CALCITE-6306 > URL: https://issues.apache.org/jira/browse/CALCITE-6306 > Project: Calcite > Issue Type: Bug > Reporter: hongyu guo > Assignee: hongyu guo > Priority: Minor > Labels: pull-request-available > Fix For: 1.37.0 > > > {code:sql} > 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 {code} > 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. -- This message was sent by Atlassian Jira (v8.20.10#820010)