Skip to content

Commit a7809c6

Browse files
Use Bool type for boolean columns in ClickHouse
In earlier versions of ClickHouse, the `UInt8` type had to be used, but now this is causing trouble with NumPy bool arrays.
1 parent eb639ca commit a7809c6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mcbackend/backends/clickhouse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"int64": "Int64",
3030
"float32": "Float32",
3131
"float64": "Float64",
32-
"bool": "UInt8",
32+
"bool": "Bool",
3333
"str": "String",
3434
}
3535

mcbackend/test_backend_clickhouse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def test_create_chain_table(self):
202202
("scalar", "UInt16"),
203203
("1D", "Array(Float32)"),
204204
("3D", "Array(Array(Array(Float64)))"),
205-
("__stat_accepted", "UInt8"),
205+
("__stat_accepted", "Bool"),
206206
]
207207
pass
208208

0 commit comments

Comments
 (0)