Describe the bug
In the documentation it is written that supported types for enum inserts are: Enum, int, long, str/basestring.https://clickhouse-driver.readthedocs.io/en/latest/types.html#enum8-16
Executing the example from the documentation works fine, except when check_types is enabled, than it fails with the following msg:
python3.7/site-packages/clickhouse_driver/columns/intcolumn.py", line 31, in before_write_items
if item >= 0:
TypeError: '>=' not supported between instances of 'str' and 'int'
To Reproduce
client.execute('DROP TABLE IF EXISTS test')
client.execute('''
CREATE TABLE test
(
x Enum8('foo' = 1, 'bar' = 2)
) ENGINE = Memory
''')
client.execute(
'INSERT INTO test (x) VALUES',
[{'x': MyEnum.foo}, {'x': 'bar'}, {'x': 1}],
types_check=True
)
print(
client.execute('SELECT * FROM test')
)
Describe the bug In the documentation it is written that supported types for enum inserts are: Enum, int, long, str/basestring. https://clickhouse-driver.readthedocs.io/en/latest/types.html#enum8-16 Executing the example from the documentation works fine, except when check_types is enabled, than it fails with the following msg:
To Reproduce
Expected behavior insert without error
Versions