JSONEachRow: allow to parse true and false as 1 and 0 for UInt8, Int8 data types [#CLICKHOUSE-3]

This commit is contained in:
Alexey Milovidov 2017-05-22 23:13:17 +03:00
parent c323d7bf99
commit 0e77575a76
2 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,4 @@
0 0
1 1
0 false
1 true

View File

@ -0,0 +1,6 @@
DROP TABLE IF EXISTS test.json;
CREATE TABLE test.json (x UInt8, title String) ENGINE = Memory;
INSERT INTO test.json FORMAT JSONEachRow {"x": true, "title": "true"}, {"x": false, "title": "false"}, {"x": 0, "title": "0"}, {"x": 1, "title": "1"}
SELECT * FROM test.json ORDER BY title;
DROP TABLE IF EXISTS test.json;