Skip to content

Commit

Permalink
fix bool and fixed_string issue (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhao0117 authored Mar 28, 2022
1 parent 3c305a7 commit 8fa0716
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion clickhouse_driver/columns/boolcolumn.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@


class BoolColumn(FormatColumn):
ch_type = 'Bool'
ch_type = 'bool'
py_types = (bool, )
format = '?'
5 changes: 4 additions & 1 deletion clickhouse_driver/columns/stringcolumn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 8fa0716

Please sign in to comment.