From f52ceced2ba88c4168afb55ffca99ce2516ccbcb Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Fri, 18 Aug 2017 23:22:56 +0300 Subject: [PATCH] Modified tests [#CLICKHOUSE-2838]. --- ...00013_1_create_table_with_arrays.reference | 0 .../00013_1_create_table_with_arrays.sql | 3 -- ..._4_select_from_table_with_arrays.reference | 3 -- .../00013_4_select_from_table_with_arrays.sql | 1 - ..._5_select_from_table_with_arrays.reference | 5 --- .../00013_5_select_from_table_with_arrays.sql | 1 - ..._6_select_from_table_with_arrays.reference | 5 --- .../00013_6_select_from_table_with_arrays.sql | 1 - ..._7_select_from_table_with_arrays.reference | 5 --- .../00013_7_select_from_table_with_arrays.sql | 1 - ..._8_select_from_table_with_arrays.reference | 5 --- .../00013_8_select_from_table_with_arrays.sql | 1 - ..._9_select_from_table_with_arrays.reference | 5 --- .../00013_9_select_from_table_with_arrays.sql | 1 - ..._a_select_from_table_with_arrays.reference | 5 --- .../00013_a_select_from_table_with_arrays.sql | 1 - ..._b_select_from_table_with_arrays.reference | 1 - .../00013_b_select_from_table_with_arrays.sql | 2 - .../00013_create_table_with_arrays.reference | 34 +++++++++++++++++ .../00013_create_table_with_arrays.sql | 9 +++++ ...00014_1_create_table_with_nested.reference | 0 .../00014_1_create_table_with_nested.sql | 3 -- ..._4_select_from_table_with_nested.reference | 3 -- .../00014_4_select_from_table_with_nested.sql | 1 - ..._5_select_from_table_with_nested.reference | 5 --- .../00014_5_select_from_table_with_nested.sql | 1 - ..._6_select_from_table_with_nested.reference | 5 --- .../00014_6_select_from_table_with_nested.sql | 1 - ..._7_select_from_table_with_nested.reference | 5 --- .../00014_7_select_from_table_with_nested.sql | 1 - ..._9_select_from_table_with_nested.reference | 5 --- .../00014_9_select_from_table_with_nested.sql | 1 - ..._a_select_from_table_with_nested.reference | 5 --- .../00014_a_select_from_table_with_nested.sql | 1 - ..._b_select_from_table_with_nested.reference | 5 --- .../00014_b_select_from_table_with_nested.sql | 1 - ..._c_select_from_table_with_nested.reference | 5 --- .../00014_c_select_from_table_with_nested.sql | 1 - ...14_select_from_table_with_nested.reference | 38 +++++++++++++++++++ .../00014_select_from_table_with_nested.sql | 7 ++++ .../queries/0_stateless/00030_alter_table.sql | 36 +++++++++--------- 41 files changed, 106 insertions(+), 113 deletions(-) delete mode 100644 dbms/tests/queries/0_stateless/00013_1_create_table_with_arrays.reference delete mode 100644 dbms/tests/queries/0_stateless/00013_1_create_table_with_arrays.sql delete mode 100644 dbms/tests/queries/0_stateless/00013_4_select_from_table_with_arrays.reference delete mode 100644 dbms/tests/queries/0_stateless/00013_4_select_from_table_with_arrays.sql delete mode 100644 dbms/tests/queries/0_stateless/00013_5_select_from_table_with_arrays.reference delete mode 100644 dbms/tests/queries/0_stateless/00013_5_select_from_table_with_arrays.sql delete mode 100644 dbms/tests/queries/0_stateless/00013_6_select_from_table_with_arrays.reference delete mode 100644 dbms/tests/queries/0_stateless/00013_6_select_from_table_with_arrays.sql delete mode 100644 dbms/tests/queries/0_stateless/00013_7_select_from_table_with_arrays.reference delete mode 100644 dbms/tests/queries/0_stateless/00013_7_select_from_table_with_arrays.sql delete mode 100644 dbms/tests/queries/0_stateless/00013_8_select_from_table_with_arrays.reference delete mode 100644 dbms/tests/queries/0_stateless/00013_8_select_from_table_with_arrays.sql delete mode 100644 dbms/tests/queries/0_stateless/00013_9_select_from_table_with_arrays.reference delete mode 100644 dbms/tests/queries/0_stateless/00013_9_select_from_table_with_arrays.sql delete mode 100644 dbms/tests/queries/0_stateless/00013_a_select_from_table_with_arrays.reference delete mode 100644 dbms/tests/queries/0_stateless/00013_a_select_from_table_with_arrays.sql delete mode 100644 dbms/tests/queries/0_stateless/00013_b_select_from_table_with_arrays.reference delete mode 100644 dbms/tests/queries/0_stateless/00013_b_select_from_table_with_arrays.sql create mode 100644 dbms/tests/queries/0_stateless/00013_create_table_with_arrays.reference create mode 100644 dbms/tests/queries/0_stateless/00013_create_table_with_arrays.sql delete mode 100644 dbms/tests/queries/0_stateless/00014_1_create_table_with_nested.reference delete mode 100644 dbms/tests/queries/0_stateless/00014_1_create_table_with_nested.sql delete mode 100644 dbms/tests/queries/0_stateless/00014_4_select_from_table_with_nested.reference delete mode 100644 dbms/tests/queries/0_stateless/00014_4_select_from_table_with_nested.sql delete mode 100644 dbms/tests/queries/0_stateless/00014_5_select_from_table_with_nested.reference delete mode 100644 dbms/tests/queries/0_stateless/00014_5_select_from_table_with_nested.sql delete mode 100644 dbms/tests/queries/0_stateless/00014_6_select_from_table_with_nested.reference delete mode 100644 dbms/tests/queries/0_stateless/00014_6_select_from_table_with_nested.sql delete mode 100644 dbms/tests/queries/0_stateless/00014_7_select_from_table_with_nested.reference delete mode 100644 dbms/tests/queries/0_stateless/00014_7_select_from_table_with_nested.sql delete mode 100644 dbms/tests/queries/0_stateless/00014_9_select_from_table_with_nested.reference delete mode 100644 dbms/tests/queries/0_stateless/00014_9_select_from_table_with_nested.sql delete mode 100644 dbms/tests/queries/0_stateless/00014_a_select_from_table_with_nested.reference delete mode 100644 dbms/tests/queries/0_stateless/00014_a_select_from_table_with_nested.sql delete mode 100644 dbms/tests/queries/0_stateless/00014_b_select_from_table_with_nested.reference delete mode 100644 dbms/tests/queries/0_stateless/00014_b_select_from_table_with_nested.sql delete mode 100644 dbms/tests/queries/0_stateless/00014_c_select_from_table_with_nested.reference delete mode 100644 dbms/tests/queries/0_stateless/00014_c_select_from_table_with_nested.sql create mode 100644 dbms/tests/queries/0_stateless/00014_select_from_table_with_nested.reference create mode 100644 dbms/tests/queries/0_stateless/00014_select_from_table_with_nested.sql diff --git a/dbms/tests/queries/0_stateless/00013_1_create_table_with_arrays.reference b/dbms/tests/queries/0_stateless/00013_1_create_table_with_arrays.reference deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/dbms/tests/queries/0_stateless/00013_1_create_table_with_arrays.sql b/dbms/tests/queries/0_stateless/00013_1_create_table_with_arrays.sql deleted file mode 100644 index 5a728830a48..00000000000 --- a/dbms/tests/queries/0_stateless/00013_1_create_table_with_arrays.sql +++ /dev/null @@ -1,3 +0,0 @@ -DROP TABLE IF EXISTS arrays_test; -CREATE TABLE arrays_test (s String, arr Array(UInt8)) ENGINE = Memory; -INSERT INTO arrays_test VALUES ('Hello', [1,2]), ('World', [3,4,5]), ('Goodbye', []); diff --git a/dbms/tests/queries/0_stateless/00013_4_select_from_table_with_arrays.reference b/dbms/tests/queries/0_stateless/00013_4_select_from_table_with_arrays.reference deleted file mode 100644 index 5a5af40fc00..00000000000 --- a/dbms/tests/queries/0_stateless/00013_4_select_from_table_with_arrays.reference +++ /dev/null @@ -1,3 +0,0 @@ -Hello [1,2] -World [3,4,5] -Goodbye [] diff --git a/dbms/tests/queries/0_stateless/00013_4_select_from_table_with_arrays.sql b/dbms/tests/queries/0_stateless/00013_4_select_from_table_with_arrays.sql deleted file mode 100644 index af4b5dd8538..00000000000 --- a/dbms/tests/queries/0_stateless/00013_4_select_from_table_with_arrays.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT * FROM arrays_test diff --git a/dbms/tests/queries/0_stateless/00013_5_select_from_table_with_arrays.reference b/dbms/tests/queries/0_stateless/00013_5_select_from_table_with_arrays.reference deleted file mode 100644 index 02ff6407fd6..00000000000 --- a/dbms/tests/queries/0_stateless/00013_5_select_from_table_with_arrays.reference +++ /dev/null @@ -1,5 +0,0 @@ -Hello 1 -Hello 2 -World 3 -World 4 -World 5 diff --git a/dbms/tests/queries/0_stateless/00013_5_select_from_table_with_arrays.sql b/dbms/tests/queries/0_stateless/00013_5_select_from_table_with_arrays.sql deleted file mode 100644 index 238f888202d..00000000000 --- a/dbms/tests/queries/0_stateless/00013_5_select_from_table_with_arrays.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT s, arr FROM arrays_test ARRAY JOIN arr diff --git a/dbms/tests/queries/0_stateless/00013_6_select_from_table_with_arrays.reference b/dbms/tests/queries/0_stateless/00013_6_select_from_table_with_arrays.reference deleted file mode 100644 index 45d362a350e..00000000000 --- a/dbms/tests/queries/0_stateless/00013_6_select_from_table_with_arrays.reference +++ /dev/null @@ -1,5 +0,0 @@ -Hello [1,2] 1 -Hello [1,2] 2 -World [3,4,5] 3 -World [3,4,5] 4 -World [3,4,5] 5 diff --git a/dbms/tests/queries/0_stateless/00013_6_select_from_table_with_arrays.sql b/dbms/tests/queries/0_stateless/00013_6_select_from_table_with_arrays.sql deleted file mode 100644 index d1c9936af30..00000000000 --- a/dbms/tests/queries/0_stateless/00013_6_select_from_table_with_arrays.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT s, arr, a FROM arrays_test ARRAY JOIN arr AS a \ No newline at end of file diff --git a/dbms/tests/queries/0_stateless/00013_7_select_from_table_with_arrays.reference b/dbms/tests/queries/0_stateless/00013_7_select_from_table_with_arrays.reference deleted file mode 100644 index 577260f94f0..00000000000 --- a/dbms/tests/queries/0_stateless/00013_7_select_from_table_with_arrays.reference +++ /dev/null @@ -1,5 +0,0 @@ -Hello [1,2] 1 1 -Hello [1,2] 2 2 -World [3,4,5] 3 1 -World [3,4,5] 4 2 -World [3,4,5] 5 3 diff --git a/dbms/tests/queries/0_stateless/00013_7_select_from_table_with_arrays.sql b/dbms/tests/queries/0_stateless/00013_7_select_from_table_with_arrays.sql deleted file mode 100644 index a75b97e6faa..00000000000 --- a/dbms/tests/queries/0_stateless/00013_7_select_from_table_with_arrays.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT s, arr, a, num FROM arrays_test ARRAY JOIN arr AS a, arrayEnumerate(arr) AS num \ No newline at end of file diff --git a/dbms/tests/queries/0_stateless/00013_8_select_from_table_with_arrays.reference b/dbms/tests/queries/0_stateless/00013_8_select_from_table_with_arrays.reference deleted file mode 100644 index e29fe6d82a1..00000000000 --- a/dbms/tests/queries/0_stateless/00013_8_select_from_table_with_arrays.reference +++ /dev/null @@ -1,5 +0,0 @@ -Hello [1,2] 1 1 [1,2] -Hello [1,2] 2 2 [1,2] -World [3,4,5] 3 1 [1,2,3] -World [3,4,5] 4 2 [1,2,3] -World [3,4,5] 5 3 [1,2,3] diff --git a/dbms/tests/queries/0_stateless/00013_8_select_from_table_with_arrays.sql b/dbms/tests/queries/0_stateless/00013_8_select_from_table_with_arrays.sql deleted file mode 100644 index d7b3a7b44b9..00000000000 --- a/dbms/tests/queries/0_stateless/00013_8_select_from_table_with_arrays.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT s, arr, a, num, arrayEnumerate(arr) FROM arrays_test ARRAY JOIN arr AS a, arrayEnumerate(arr) AS num \ No newline at end of file diff --git a/dbms/tests/queries/0_stateless/00013_9_select_from_table_with_arrays.reference b/dbms/tests/queries/0_stateless/00013_9_select_from_table_with_arrays.reference deleted file mode 100644 index 58328ca2588..00000000000 --- a/dbms/tests/queries/0_stateless/00013_9_select_from_table_with_arrays.reference +++ /dev/null @@ -1,5 +0,0 @@ -Hello [1,2] 1 2 -Hello [1,2] 2 3 -World [3,4,5] 3 4 -World [3,4,5] 4 5 -World [3,4,5] 5 6 diff --git a/dbms/tests/queries/0_stateless/00013_9_select_from_table_with_arrays.sql b/dbms/tests/queries/0_stateless/00013_9_select_from_table_with_arrays.sql deleted file mode 100644 index 010faea3d76..00000000000 --- a/dbms/tests/queries/0_stateless/00013_9_select_from_table_with_arrays.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT s, arr, a, mapped FROM arrays_test ARRAY JOIN arr AS a, arrayMap(x -> x + 1, arr) AS mapped diff --git a/dbms/tests/queries/0_stateless/00013_a_select_from_table_with_arrays.reference b/dbms/tests/queries/0_stateless/00013_a_select_from_table_with_arrays.reference deleted file mode 100644 index 14686f65be3..00000000000 --- a/dbms/tests/queries/0_stateless/00013_a_select_from_table_with_arrays.reference +++ /dev/null @@ -1,5 +0,0 @@ -Hello [1,2] 1 1 2 -Hello [1,2] 2 2 3 -World [3,4,5] 3 1 4 -World [3,4,5] 4 2 5 -World [3,4,5] 5 3 6 diff --git a/dbms/tests/queries/0_stateless/00013_a_select_from_table_with_arrays.sql b/dbms/tests/queries/0_stateless/00013_a_select_from_table_with_arrays.sql deleted file mode 100644 index 1c4b2b02e19..00000000000 --- a/dbms/tests/queries/0_stateless/00013_a_select_from_table_with_arrays.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT s, arr, a, num, mapped FROM arrays_test ARRAY JOIN arr AS a, arrayEnumerate(arr) AS num, arrayMap(x -> x + 1, arr) AS mapped diff --git a/dbms/tests/queries/0_stateless/00013_b_select_from_table_with_arrays.reference b/dbms/tests/queries/0_stateless/00013_b_select_from_table_with_arrays.reference deleted file mode 100644 index 725d1e7afd5..00000000000 --- a/dbms/tests/queries/0_stateless/00013_b_select_from_table_with_arrays.reference +++ /dev/null @@ -1 +0,0 @@ -15 15 3 diff --git a/dbms/tests/queries/0_stateless/00013_b_select_from_table_with_arrays.sql b/dbms/tests/queries/0_stateless/00013_b_select_from_table_with_arrays.sql deleted file mode 100644 index 95106c9748a..00000000000 --- a/dbms/tests/queries/0_stateless/00013_b_select_from_table_with_arrays.sql +++ /dev/null @@ -1,2 +0,0 @@ -SELECT sumArray(arr), sumArrayIf(arr, s LIKE '%l%'), sumArrayIf(arr, s LIKE '%e%') FROM arrays_test - diff --git a/dbms/tests/queries/0_stateless/00013_create_table_with_arrays.reference b/dbms/tests/queries/0_stateless/00013_create_table_with_arrays.reference new file mode 100644 index 00000000000..5c3376dd493 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00013_create_table_with_arrays.reference @@ -0,0 +1,34 @@ +Hello [1,2] +World [3,4,5] +Goodbye [] +Hello 1 +Hello 2 +World 3 +World 4 +World 5 +Hello [1,2] 1 +Hello [1,2] 2 +World [3,4,5] 3 +World [3,4,5] 4 +World [3,4,5] 5 +Hello [1,2] 1 1 +Hello [1,2] 2 2 +World [3,4,5] 3 1 +World [3,4,5] 4 2 +World [3,4,5] 5 3 +Hello [1,2] 1 1 [1,2] +Hello [1,2] 2 2 [1,2] +World [3,4,5] 3 1 [1,2,3] +World [3,4,5] 4 2 [1,2,3] +World [3,4,5] 5 3 [1,2,3] +Hello [1,2] 1 2 +Hello [1,2] 2 3 +World [3,4,5] 3 4 +World [3,4,5] 4 5 +World [3,4,5] 5 6 +Hello [1,2] 1 1 2 +Hello [1,2] 2 2 3 +World [3,4,5] 3 1 4 +World [3,4,5] 4 2 5 +World [3,4,5] 5 3 6 +15 15 3 diff --git a/dbms/tests/queries/0_stateless/00013_create_table_with_arrays.sql b/dbms/tests/queries/0_stateless/00013_create_table_with_arrays.sql new file mode 100644 index 00000000000..5ee170c5e61 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00013_create_table_with_arrays.sql @@ -0,0 +1,9 @@ +DROP TABLE IF EXISTS arrays_test; +CREATE TABLE arrays_test (s String, arr Array(UInt8)) ENGINE = Memory; +INSERT INTO arrays_test VALUES ('Hello', [1,2]), ('World', [3,4,5]), ('Goodbye', []); +SELECT * FROM arrays_test +SELECT s, arr FROM arrays_test ARRAY JOIN arr +SELECT s, arr, a FROM arrays_test ARRAY JOIN arr AS aSELECT s, arr, a, num FROM arrays_test ARRAY JOIN arr AS a, arrayEnumerate(arr) AS numSELECT s, arr, a, num, arrayEnumerate(arr) FROM arrays_test ARRAY JOIN arr AS a, arrayEnumerate(arr) AS numSELECT s, arr, a, mapped FROM arrays_test ARRAY JOIN arr AS a, arrayMap(x -> x + 1, arr) AS mapped +SELECT s, arr, a, num, mapped FROM arrays_test ARRAY JOIN arr AS a, arrayEnumerate(arr) AS num, arrayMap(x -> x + 1, arr) AS mapped +SELECT sumArray(arr), sumArrayIf(arr, s LIKE '%l%'), sumArrayIf(arr, s LIKE '%e%') FROM arrays_test + diff --git a/dbms/tests/queries/0_stateless/00014_1_create_table_with_nested.reference b/dbms/tests/queries/0_stateless/00014_1_create_table_with_nested.reference deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/dbms/tests/queries/0_stateless/00014_1_create_table_with_nested.sql b/dbms/tests/queries/0_stateless/00014_1_create_table_with_nested.sql deleted file mode 100644 index 56722dee7ac..00000000000 --- a/dbms/tests/queries/0_stateless/00014_1_create_table_with_nested.sql +++ /dev/null @@ -1,3 +0,0 @@ -DROP TABLE IF EXISTS nested_test; -CREATE TABLE nested_test (s String, nest Nested(x UInt8, y UInt32)) ENGINE = Memory; -INSERT INTO nested_test VALUES ('Hello', [1,2], [10,20]), ('World', [3,4,5], [30,40,50]), ('Goodbye', [], []); diff --git a/dbms/tests/queries/0_stateless/00014_4_select_from_table_with_nested.reference b/dbms/tests/queries/0_stateless/00014_4_select_from_table_with_nested.reference deleted file mode 100644 index 32bd08bad02..00000000000 --- a/dbms/tests/queries/0_stateless/00014_4_select_from_table_with_nested.reference +++ /dev/null @@ -1,3 +0,0 @@ -Hello [1,2] [10,20] -World [3,4,5] [30,40,50] -Goodbye [] [] diff --git a/dbms/tests/queries/0_stateless/00014_4_select_from_table_with_nested.sql b/dbms/tests/queries/0_stateless/00014_4_select_from_table_with_nested.sql deleted file mode 100644 index 509911959ac..00000000000 --- a/dbms/tests/queries/0_stateless/00014_4_select_from_table_with_nested.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT * FROM nested_test diff --git a/dbms/tests/queries/0_stateless/00014_5_select_from_table_with_nested.reference b/dbms/tests/queries/0_stateless/00014_5_select_from_table_with_nested.reference deleted file mode 100644 index 05200edd33b..00000000000 --- a/dbms/tests/queries/0_stateless/00014_5_select_from_table_with_nested.reference +++ /dev/null @@ -1,5 +0,0 @@ -Hello 1 10 -Hello 2 20 -World 3 30 -World 4 40 -World 5 50 diff --git a/dbms/tests/queries/0_stateless/00014_5_select_from_table_with_nested.sql b/dbms/tests/queries/0_stateless/00014_5_select_from_table_with_nested.sql deleted file mode 100644 index 31e1ac1b05e..00000000000 --- a/dbms/tests/queries/0_stateless/00014_5_select_from_table_with_nested.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT s, nest.x, nest.y FROM nested_test ARRAY JOIN nest diff --git a/dbms/tests/queries/0_stateless/00014_6_select_from_table_with_nested.reference b/dbms/tests/queries/0_stateless/00014_6_select_from_table_with_nested.reference deleted file mode 100644 index 8ea4568b73c..00000000000 --- a/dbms/tests/queries/0_stateless/00014_6_select_from_table_with_nested.reference +++ /dev/null @@ -1,5 +0,0 @@ -Hello 1 [10,20] -Hello 2 [10,20] -World 3 [30,40,50] -World 4 [30,40,50] -World 5 [30,40,50] diff --git a/dbms/tests/queries/0_stateless/00014_6_select_from_table_with_nested.sql b/dbms/tests/queries/0_stateless/00014_6_select_from_table_with_nested.sql deleted file mode 100644 index 3648cb4852c..00000000000 --- a/dbms/tests/queries/0_stateless/00014_6_select_from_table_with_nested.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT s, nest.x, nest.y FROM nested_test ARRAY JOIN nest.x diff --git a/dbms/tests/queries/0_stateless/00014_7_select_from_table_with_nested.reference b/dbms/tests/queries/0_stateless/00014_7_select_from_table_with_nested.reference deleted file mode 100644 index 05200edd33b..00000000000 --- a/dbms/tests/queries/0_stateless/00014_7_select_from_table_with_nested.reference +++ /dev/null @@ -1,5 +0,0 @@ -Hello 1 10 -Hello 2 20 -World 3 30 -World 4 40 -World 5 50 diff --git a/dbms/tests/queries/0_stateless/00014_7_select_from_table_with_nested.sql b/dbms/tests/queries/0_stateless/00014_7_select_from_table_with_nested.sql deleted file mode 100644 index 9380d7d285f..00000000000 --- a/dbms/tests/queries/0_stateless/00014_7_select_from_table_with_nested.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT s, nest.x, nest.y FROM nested_test ARRAY JOIN nest.x, nest.y \ No newline at end of file diff --git a/dbms/tests/queries/0_stateless/00014_9_select_from_table_with_nested.reference b/dbms/tests/queries/0_stateless/00014_9_select_from_table_with_nested.reference deleted file mode 100644 index 05200edd33b..00000000000 --- a/dbms/tests/queries/0_stateless/00014_9_select_from_table_with_nested.reference +++ /dev/null @@ -1,5 +0,0 @@ -Hello 1 10 -Hello 2 20 -World 3 30 -World 4 40 -World 5 50 diff --git a/dbms/tests/queries/0_stateless/00014_9_select_from_table_with_nested.sql b/dbms/tests/queries/0_stateless/00014_9_select_from_table_with_nested.sql deleted file mode 100644 index 945f3dc79a1..00000000000 --- a/dbms/tests/queries/0_stateless/00014_9_select_from_table_with_nested.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT s, n.x, n.y FROM nested_test ARRAY JOIN nest AS n \ No newline at end of file diff --git a/dbms/tests/queries/0_stateless/00014_a_select_from_table_with_nested.reference b/dbms/tests/queries/0_stateless/00014_a_select_from_table_with_nested.reference deleted file mode 100644 index d40754269c6..00000000000 --- a/dbms/tests/queries/0_stateless/00014_a_select_from_table_with_nested.reference +++ /dev/null @@ -1,5 +0,0 @@ -Hello 1 10 [1,2] -Hello 2 20 [1,2] -World 3 30 [3,4,5] -World 4 40 [3,4,5] -World 5 50 [3,4,5] diff --git a/dbms/tests/queries/0_stateless/00014_a_select_from_table_with_nested.sql b/dbms/tests/queries/0_stateless/00014_a_select_from_table_with_nested.sql deleted file mode 100644 index 4e275aa4e12..00000000000 --- a/dbms/tests/queries/0_stateless/00014_a_select_from_table_with_nested.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT s, n.x, n.y, nest.x FROM nested_test ARRAY JOIN nest AS n \ No newline at end of file diff --git a/dbms/tests/queries/0_stateless/00014_b_select_from_table_with_nested.reference b/dbms/tests/queries/0_stateless/00014_b_select_from_table_with_nested.reference deleted file mode 100644 index 7129270657e..00000000000 --- a/dbms/tests/queries/0_stateless/00014_b_select_from_table_with_nested.reference +++ /dev/null @@ -1,5 +0,0 @@ -Hello 1 10 [1,2] [10,20] -Hello 2 20 [1,2] [10,20] -World 3 30 [3,4,5] [30,40,50] -World 4 40 [3,4,5] [30,40,50] -World 5 50 [3,4,5] [30,40,50] diff --git a/dbms/tests/queries/0_stateless/00014_b_select_from_table_with_nested.sql b/dbms/tests/queries/0_stateless/00014_b_select_from_table_with_nested.sql deleted file mode 100644 index 4643e428942..00000000000 --- a/dbms/tests/queries/0_stateless/00014_b_select_from_table_with_nested.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT s, n.x, n.y, nest.x, nest.y FROM nested_test ARRAY JOIN nest AS n \ No newline at end of file diff --git a/dbms/tests/queries/0_stateless/00014_c_select_from_table_with_nested.reference b/dbms/tests/queries/0_stateless/00014_c_select_from_table_with_nested.reference deleted file mode 100644 index fa7a8052ce9..00000000000 --- a/dbms/tests/queries/0_stateless/00014_c_select_from_table_with_nested.reference +++ /dev/null @@ -1,5 +0,0 @@ -Hello 1 10 [1,2] [10,20] 1 -Hello 2 20 [1,2] [10,20] 2 -World 3 30 [3,4,5] [30,40,50] 1 -World 4 40 [3,4,5] [30,40,50] 2 -World 5 50 [3,4,5] [30,40,50] 3 diff --git a/dbms/tests/queries/0_stateless/00014_c_select_from_table_with_nested.sql b/dbms/tests/queries/0_stateless/00014_c_select_from_table_with_nested.sql deleted file mode 100644 index 6033dd1c011..00000000000 --- a/dbms/tests/queries/0_stateless/00014_c_select_from_table_with_nested.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT s, n.x, n.y, nest.x, nest.y, num FROM nested_test ARRAY JOIN nest AS n, arrayEnumerate(nest.x) AS num \ No newline at end of file diff --git a/dbms/tests/queries/0_stateless/00014_select_from_table_with_nested.reference b/dbms/tests/queries/0_stateless/00014_select_from_table_with_nested.reference new file mode 100644 index 00000000000..bf1087c9220 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00014_select_from_table_with_nested.reference @@ -0,0 +1,38 @@ +Hello [1,2] [10,20] +World [3,4,5] [30,40,50] +Goodbye [] [] +Hello 1 10 +Hello 2 20 +World 3 30 +World 4 40 +World 5 50 +Hello 1 [10,20] +Hello 2 [10,20] +World 3 [30,40,50] +World 4 [30,40,50] +World 5 [30,40,50] +Hello 1 10 +Hello 2 20 +World 3 30 +World 4 40 +World 5 50 +Hello 1 10 +Hello 2 20 +World 3 30 +World 4 40 +World 5 50 +Hello 1 10 [1,2] +Hello 2 20 [1,2] +World 3 30 [3,4,5] +World 4 40 [3,4,5] +World 5 50 [3,4,5] +Hello 1 10 [1,2] [10,20] +Hello 2 20 [1,2] [10,20] +World 3 30 [3,4,5] [30,40,50] +World 4 40 [3,4,5] [30,40,50] +World 5 50 [3,4,5] [30,40,50] +Hello 1 10 [1,2] [10,20] 1 +Hello 2 20 [1,2] [10,20] 2 +World 3 30 [3,4,5] [30,40,50] 1 +World 4 40 [3,4,5] [30,40,50] 2 +World 5 50 [3,4,5] [30,40,50] 3 diff --git a/dbms/tests/queries/0_stateless/00014_select_from_table_with_nested.sql b/dbms/tests/queries/0_stateless/00014_select_from_table_with_nested.sql new file mode 100644 index 00000000000..9e8795cfc19 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00014_select_from_table_with_nested.sql @@ -0,0 +1,7 @@ +DROP TABLE IF EXISTS nested_test; +CREATE TABLE nested_test (s String, nest Nested(x UInt8, y UInt32)) ENGINE = Memory; +INSERT INTO nested_test VALUES ('Hello', [1,2], [10,20]), ('World', [3,4,5], [30,40,50]), ('Goodbye', [], []); +SELECT * FROM nested_test +SELECT s, nest.x, nest.y FROM nested_test ARRAY JOIN nest +SELECT s, nest.x, nest.y FROM nested_test ARRAY JOIN nest.x +SELECT s, nest.x, nest.y FROM nested_test ARRAY JOIN nest.x, nest.ySELECT s, n.x, n.y FROM nested_test ARRAY JOIN nest AS nSELECT s, n.x, n.y, nest.x FROM nested_test ARRAY JOIN nest AS nSELECT s, n.x, n.y, nest.x, nest.y FROM nested_test ARRAY JOIN nest AS nSELECT s, n.x, n.y, nest.x, nest.y, num FROM nested_test ARRAY JOIN nest AS n, arrayEnumerate(nest.x) AS num \ No newline at end of file diff --git a/dbms/tests/queries/0_stateless/00030_alter_table.sql b/dbms/tests/queries/0_stateless/00030_alter_table.sql index 6a9fa8719f1..231840818cf 100644 --- a/dbms/tests/queries/0_stateless/00030_alter_table.sql +++ b/dbms/tests/queries/0_stateless/00030_alter_table.sql @@ -1,30 +1,30 @@ -DROP TABLE IF EXISTS alter_test; +DROP TABLE IF EXISTS test.alter_test; -CREATE TABLE alter_test (CounterID UInt32, StartDate Date, UserID UInt32, VisitID UInt32, NestedColumn Nested(A UInt8, S String), ToDrop UInt32) ENGINE = MergeTree(StartDate, intHash32(UserID), (CounterID, StartDate, intHash32(UserID), VisitID), 8192); +CREATE TABLE test.alter_test (CounterID UInt32, StartDate Date, UserID UInt32, VisitID UInt32, NestedColumn Nested(A UInt8, S String), ToDrop UInt32) ENGINE = MergeTree(StartDate, intHash32(UserID), (CounterID, StartDate, intHash32(UserID), VisitID), 8192); -INSERT INTO alter_test VALUES (1, '2014-01-01', 2, 3, [1,2,3], ['a','b','c'], 4); +INSERT INTO test.alter_test VALUES (1, '2014-01-01', 2, 3, [1,2,3], ['a','b','c'], 4); -ALTER TABLE alter_test ADD COLUMN Added0 UInt32; -ALTER TABLE alter_test ADD COLUMN Added2 UInt32; -ALTER TABLE alter_test ADD COLUMN Added1 UInt32 AFTER Added0; +ALTER TABLE test.alter_test ADD COLUMN Added0 UInt32; +ALTER TABLE test.alter_test ADD COLUMN Added2 UInt32; +ALTER TABLE test.alter_test ADD COLUMN Added1 UInt32 AFTER Added0; -ALTER TABLE alter_test ADD COLUMN AddedNested1 Nested(A UInt32, B UInt64) AFTER Added2; -ALTER TABLE alter_test ADD COLUMN AddedNested1.C Array(String) AFTER AddedNested1.B; -ALTER TABLE alter_test ADD COLUMN AddedNested2 Nested(A UInt32, B UInt64) AFTER AddedNested1; +ALTER TABLE test.alter_test ADD COLUMN AddedNested1 Nested(A UInt32, B UInt64) AFTER Added2; +ALTER TABLE test.alter_test ADD COLUMN AddedNested1.C Array(String) AFTER AddedNested1.B; +ALTER TABLE test.alter_test ADD COLUMN AddedNested2 Nested(A UInt32, B UInt64) AFTER AddedNested1; -DESC TABLE alter_test; +DESC TABLE test.alter_test; -ALTER TABLE alter_test DROP COLUMN ToDrop; +ALTER TABLE test.alter_test DROP COLUMN ToDrop; -ALTER TABLE alter_test MODIFY COLUMN Added0 String; +ALTER TABLE test.alter_test MODIFY COLUMN Added0 String; -ALTER TABLE alter_test DROP COLUMN NestedColumn.A; -ALTER TABLE alter_test DROP COLUMN NestedColumn.S; +ALTER TABLE test.alter_test DROP COLUMN NestedColumn.A; +ALTER TABLE test.alter_test DROP COLUMN NestedColumn.S; -ALTER TABLE alter_test DROP COLUMN AddedNested1.B; +ALTER TABLE test.alter_test DROP COLUMN AddedNested1.B; -DESC TABLE alter_test; +DESC TABLE test.alter_test; -SELECT * FROM alter_test; +SELECT * FROM test.alter_test; -DROP TABLE alter_test; +DROP TABLE test.alter_test;