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
Describe the bug
When you nest Tuple(Tuple) or Map(Enum) you get error
To Reproduce
CREATE TABLE color_map (
id UInt32,
colors Map(Enum('hello' = 1, 'world' = 2), String)
) ENGINE = Memory;
And try to compile type. Expected behavior
Should be Map(Enum, String), we get error.
Versions
0.2, but code still wrong in new versions
python 3.10
The text was updated successfully, but these errors were encountered:
I wrote a function to split it and we use it in production.
@staticmethod
def _split_inner(inner: str):
start = 0
result_split = []
num_in_brackets = 0
for idx, char in enumerate(inner):
if char == ',' and not num_in_brackets:
result_split.append(inner[start:idx].strip())
start = idx + 1
if char == ')' and num_in_brackets:
num_in_brackets -= 1
if char == '(':
num_in_brackets += 1
# asserting that there is something after last comma
result_split.append(inner[start:].strip())
return result_split
Describe the bug
When you nest Tuple(Tuple) or Map(Enum) you get error
To Reproduce
CREATE TABLE color_map (
id UInt32,
colors Map(Enum('hello' = 1, 'world' = 2), String)
) ENGINE = Memory;
And try to compile type.
Expected behavior
Should be Map(Enum, String), we get error.
Versions
0.2, but code still wrong in new versions
python 3.10
The text was updated successfully, but these errors were encountered: