ClickHouse / clickhouse-odbc

ODBC driver for ClickHouse
https://clickhouse.tech
Apache License 2.0
245 stars 86 forks source link

CH Server not support tableau odbc driver build sql #378

Open shadowDy opened 2 years ago

shadowDy commented 2 years ago

http body receive sql : -- Note: Unless you save your query, these tabs will NOT persist if you clear your cookies or change browser\n\n SELECT t0.date AS date, SUM({fn CONVERT((CASE WHEN (new.ie = '

<91><9A>') THEN 1 ELSE 0 END), SQL_BIGINT)}) AS `sum_Calculation_41236099892379657_ok` FROM `new` INNER JOIN ( SELECT `new`.`ce` AS `ce`, CAST(`new_re`.`date` AS DATE) AS `date` FROM `new` INNER JOIN `new_re` ON (`new`.`ce` = `new_re`.`a_ce`) WHERE ((CAST(`new_re`.`date` AS DATE) >= {d '2021-09-02'}) AND (CAST(`new_re`.`date` AS DATE ) <= {d '2021-10-17'}) AND (`new_re`.`id` = '1')) GROUP BY `ce`, `date` ) `t0` ON (`new`.`ce` = `t0`.`ce`) GROUP BY `date`\nLIMIT 1000 FORMAT TabSeparatedWithNamesAndTypes CH Server exception: 2021.10.25 16:35:51.110050 [ 32028 ] {16AF776357FC6D99} DynamicQueryHandler: Code: 62, e.displayText() = DB::Exception: Syntax error: failed at position 157 ('CONVERT') (line 3, col 47): C ONVERT((CASE WHEN (`new`.`ie` = '�<91>�<9A>') THEN 1 ELSE 0 END), SQL_BIGINT)}) AS `sum_Calculation_41236099892379657_ok` FROM `ne. Expected one of: end of query , colon between name and type, Stack trace (when copying this message, always include the lines below):