its-felix opened a new issue, #36926: URL: https://github.com/apache/superset/issues/36926
### Bug description With the update to Superset 6.0.0, ARRAY expressions on Apache Druid are falsely mutated. Any query with an array expression (i.e. `ARRAY[1, 2, 3]`) is mutated to a wrong form `ARRAY(1, 2, 3)`, causing the following exception in Druid: ``` class org.apache.calcite.sql.fun.SqlArrayValueConstructor cannot be cast to class org.apache.calcite.sql.SqlFunction (org.apache.calcite.sql.fun.SqlArrayValueConstructor ``` I have created a fix in sqlglot at https://github.com/tobymao/sqlglot/pull/6664 For other readers: the issue can be monkey-patched: ```python # monkey patch Druid Dialect (see https://github.com/tobymao/sqlglot/pull/6664) from sqlglot import exp from sqlglot.dialects.druid import Druid Druid.Generator.TRANSFORMS[exp.Array] = lambda self, e: f"ARRAY[{self.expressions(e)}]" ``` ### Screenshots/recordings _No response_ ### Superset version master / latest-dev ### Python version 3.9 ### Node version 16 ### Browser Chrome ### Additional context _No response_ ### Checklist - [ ] I have searched Superset docs and Slack and didn't find a solution to my problem. - [ ] I have searched the GitHub issue tracker and didn't find a similar bug report. - [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
