From 75fe61251b601df607344f13b1ce407773d6d370 Mon Sep 17 00:00:00 2001 From: Avogar Date: Thu, 30 Jan 2020 17:03:07 +0300 Subject: [PATCH] Add test for data in square brackets in JSONEachRow. --- .../01072_json_each_row_data_in_square_brackets.reference | 2 ++ .../01072_json_each_row_data_in_square_brackets.sql | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 dbms/tests/queries/0_stateless/01072_json_each_row_data_in_square_brackets.reference create mode 100644 dbms/tests/queries/0_stateless/01072_json_each_row_data_in_square_brackets.sql diff --git a/dbms/tests/queries/0_stateless/01072_json_each_row_data_in_square_brackets.reference b/dbms/tests/queries/0_stateless/01072_json_each_row_data_in_square_brackets.reference new file mode 100644 index 00000000000..8ad80014142 --- /dev/null +++ b/dbms/tests/queries/0_stateless/01072_json_each_row_data_in_square_brackets.reference @@ -0,0 +1,2 @@ +1 name1 +2 name2 diff --git a/dbms/tests/queries/0_stateless/01072_json_each_row_data_in_square_brackets.sql b/dbms/tests/queries/0_stateless/01072_json_each_row_data_in_square_brackets.sql new file mode 100644 index 00000000000..bd83373c570 --- /dev/null +++ b/dbms/tests/queries/0_stateless/01072_json_each_row_data_in_square_brackets.sql @@ -0,0 +1,6 @@ +DROP TABLE IF EXISTS json_square_brackets; +CREATE TABLE json_square_brackets (id UInt32, name String) ENGINE = Memory; +INSERT INTO json_square_brackets FORMAT JSONEachRow [{"id": 1, "name": "name1"}, {"id": 2, "name": "name2"}] + +SELECT * FROM json_square_brackets ORDER BY id; +DROP TABLE IF EXISTS json_square_brackets;