Issue
While communicating with the data source on a MariaDB Database and using ColumnStore as the table storage engine, an error occurs:
Bad Connection: Tableau could not connect to the data source.
[ma-3.1.13][10.5.10-7-MariaDB-enterprise]Internal error: IDB-1000: 'TABLE_A' and 'sub-query' are not joined.
An example of the issued query is shown below. Running the same query on the MariaDB database side directly via other workbench clients like MySQL Workbench or A5SQLMk2 results in the same error.
SELECT
SUM(`TABLE_A`.`col_a`) AS `sum_col_a_ok`,
`t1`.`col_b` AS `col_b`
FROM `TABLE_A`
INNER JOIN (
SELECT
`TABLE_A`.`col_c` AS `col_c`,
`t0`.`col_b` AS `col_b`
FROM `TABLE_A`
LEFT JOIN (
SELECT `TABLE_B`.`col_b` AS `col_b`,
(`TABLE_B`.`col_d` / 1000) AS `$temp0`,
(`TABLE_B`.`col_e` / 1000) AS `$temp1`
FROM `TABLE_B`
) `t0`
ON (
(`TABLE_A`.`col_c` > `t0`.`$temp0`)
AND
(`TABLE_A`.`col_c` <= `t0`.`$temp1`)
)
GROUP BY 2,1
) `t1`
ON (
(`TABLE_A`.`col_c` <=> `t1`.`col_c`)
AND
(`TABLE_A`.`col_c` <=> `t1`.`col_c`)
)
GROUP BY 2