You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE TABLE IF NOT EXISTS bugtable on cluster 'local' (
id Int,
metadata Map(String, Map(String, Nullable(String)))
) ENGINE = MergeTree()
order by id
Reflection using get_columns() fails with Map.__init__() missing 1 required positional argument: 'value_type'
- the .split(',') is getting an input of String, Map(String, Nullable(String)) and splits it to [String, 'Map(String', 'Nullable(String))'] - it doesn't respect the parentheses. It could probably be replaced with a .split(',', maxsplit=1) to fix this issue (unless the key type was also complex, but that seems less likely)
Expected behavior
This should get reflected properly.
Describe the bug
For a table DDL like this:
Reflection using get_columns() fails with
Map.__init__() missing 1 required positional argument: 'value_type'
It looks like the issue is in this code
clickhouse-sqlalchemy/clickhouse_sqlalchemy/drivers/base.py
Lines 242 to 248 in a3140a9
.split(',')
is getting an input ofString, Map(String, Nullable(String))
and splits it to[String, 'Map(String', 'Nullable(String))']
- it doesn't respect the parentheses. It could probably be replaced with a.split(',', maxsplit=1)
to fix this issue (unless the key type was also complex, but that seems less likely)Expected behavior
This should get reflected properly.
Originally discovered in the DataHub slack community: https://datahubspace.slack.com/archives/CUMUWQU66/p1698241313514559?thread_ts=1698112545.709559&cid=CUMUWQU66
The text was updated successfully, but these errors were encountered: