diff --git a/clickhouse_driver/columns/boolcolumn.py b/clickhouse_driver/columns/boolcolumn.py index 8b75258..36aaa0a 100644 --- a/clickhouse_driver/columns/boolcolumn.py +++ b/clickhouse_driver/columns/boolcolumn.py @@ -2,6 +2,6 @@ class BoolColumn(FormatColumn): - ch_type = 'Bool' + ch_type = 'bool' py_types = (bool, ) format = '?' diff --git a/clickhouse_driver/columns/stringcolumn.py b/clickhouse_driver/columns/stringcolumn.py index 32eac95..2ad00da 100644 --- a/clickhouse_driver/columns/stringcolumn.py +++ b/clickhouse_driver/columns/stringcolumn.py @@ -68,6 +68,9 @@ def create_string_column(spec, column_options): cls = ByteString if strings_as_bytes else String return cls(encoding=encoding, **column_options) else: - length = int(spec[12:-1]) + length_str = spec[12:-1] + if "(" in length_str: + length_str = length_str.replace("(", "") + length = int(length_str) cls = ByteFixedString if strings_as_bytes else FixedString return cls(length, encoding=encoding, **column_options)