clickhouse-sqlalchemy
clickhouse-sqlalchemy copied to clipboard
with uri clickhouse:// to insert data with integer field, there isn't range check, can insert successfully with out of range integer value
Describe the bug clickhouse-sqlalchemy support 2 kinds of uri uri = 'clickhouse+native://localhost/default' with native tcp port(9000) uri = 'clickhouse://localhost/default' with http port(8123) with http mode, for example, I have a uint32 field called u32fd, insert data 908,603,248(0011 0110 0010 1000 0010 1111 0111 0000) to u32fd, can insert successfully. But the real value in database is 12144, which is cut from low 16bit(0010 1111 0111 0000)
but with native tcp mode, insert unsuccessfully, raise error Orig exception: Code: 53. Type mismatch in VALUES section. Repeat query with types_check=True for detailed info. Column DieTestSequence: ushort format requires 0 <= number <= (0x7fff * 2 + 1)
To Reproduce uri = 'clickhouse://localhost/default' with http port(8123)
Expected behavior with http mode to insert data, same result with tcp mode
Versions clickhouse-sqlalchemy0.2.1
- Version of package with the problem. python3.9.13