-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Describe the bug
Invalid SQL syntax generated for clickhouse database when grouping by joined cubes
Cubejs generate join key of the form: (table1.col1 = table2.col2 OR ((table1.col1 IS NULL) AND (table2.col2 IS NULL))), trying to match keys having null values,
Clickhouse doesn't support using "is null" in join keys
It also try to cast fields to STRING instead of String which also cause a syntax error on clickhouse (EDITED 02/04/26)
Clickhouse doesn't support using "is null" in join keys
To Reproduce
make a query involving a group by over a joined cube with clickhouse as the database backend
Expected behavior
Generate another equivalent syntax compatible with clickhouse, for exemple COALESCE(table1.col1, -1) = COALESCE(table2.col2, -1) works
Version:
cubejs:1.3, cubejs:1.6.7
*EDIT 02/04/26:
Relevant Configuration
CUBEJS_TESSERACT_SQL_PLANNER: "true" <= This gets fixed when tesseract is deactivated