Tableau queries with RTRIM and LTRIM are not processed correctly
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
Consider using ODBC driver via https://github.com/Altinity/clickhouse-tableau-connector-odbc with Tableau.