ClickHouse / clickhouse-odbc

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

Wrong number of fields with grouparray via ODBC #433

Open jmarquardt opened 8 months ago

jmarquardt commented 8 months ago

Hi,

The following statement should give a list of fields per table:

SELECT 
table AS table_name
, REPLACE(REPLACE(REPLACE(toString(groupArray(name)), '[',''), ']',''), '''', '') AS fieldlist
FROM system.columns
GROUP BY table

In DB Visualizer or native, we get the correct number of entries in the fieldlist (our test table has 367 fields), but with ODBC, we receive much more fields (some of them are listed twice or even more).