Skip to content

Invalid SQL syntax generated for clickhouse database on join keysΒ #10316

@BlueMagma2

Description

@BlueMagma2

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

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

Metadata

Metadata

Assignees

Labels

driver:clickhouseIssues related to the ClickHouse driver

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions