clickhouse-odbc icon indicating copy to clipboard operation
clickhouse-odbc copied to clipboard

Tableau queries with RTRIM and LTRIM are not processed correctly

Open dmserg opened this issue 5 years ago • 1 comments

In some cases Tableau generates pretty fancy SQL with lots of SUBSTRING, RTRIM, etc. SQL queries with RTRIM and LTRIM are not processed correctly. LTRIM is replaced with empty func and RTRIM causes unparseable SQL in some cases

Example: SELECT {fn SUBSTRING({fn RTRIM('123456')}, 1, 3)} is translated by ODBC driver code to SELECT substringUTF8({fn SUBSTRING({fn RTRIM('123456')}, 1, 3)}'123456')

The root cause is in function_declare.h - it doesn't declare RTRIM at all and LTRIM is translated to "" I expect that both to be translated into trimRight and trimLeft respectively

dmserg avatar Nov 20 '20 14:11 dmserg

Consider using ODBC driver via https://github.com/Altinity/clickhouse-tableau-connector-odbc with Tableau.

traceon avatar Jul 25 '21 12:07 traceon