From dd76cb74794d3a7649cf6ab97f0c2ade67cac31f Mon Sep 17 00:00:00 2001 From: Pavel Kartavyy Date: Tue, 20 May 2014 19:42:59 +0400 Subject: [PATCH] clickhouse: updated test for alter [#METR-11063] --- dbms/tests/queries/0_stateless/00030_1_alter_table.reference | 5 +++++ dbms/tests/queries/0_stateless/00030_1_alter_table.sql | 4 ++++ dbms/tests/queries/0_stateless/00030_2_alter_table.reference | 4 ++++ dbms/tests/queries/0_stateless/00030_2_alter_table.sql | 2 ++ dbms/tests/queries/0_stateless/00030_3_alter_table.reference | 2 +- 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/dbms/tests/queries/0_stateless/00030_1_alter_table.reference b/dbms/tests/queries/0_stateless/00030_1_alter_table.reference index 9fda58741f4..cbbddce5939 100644 --- a/dbms/tests/queries/0_stateless/00030_1_alter_table.reference +++ b/dbms/tests/queries/0_stateless/00030_1_alter_table.reference @@ -8,3 +8,8 @@ ToDrop UInt32 Added0 UInt32 Added1 UInt32 Added2 UInt32 +AddedNested1.A Array(UInt32) +AddedNested1.B Array(UInt64) +AddedNested1.C Array(String) +AddedNested2.A Array(UInt32) +AddedNested2.B Array(UInt64) diff --git a/dbms/tests/queries/0_stateless/00030_1_alter_table.sql b/dbms/tests/queries/0_stateless/00030_1_alter_table.sql index 77d25d15cb4..0d2a4c61263 100644 --- a/dbms/tests/queries/0_stateless/00030_1_alter_table.sql +++ b/dbms/tests/queries/0_stateless/00030_1_alter_table.sql @@ -8,4 +8,8 @@ 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 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; + DESC TABLE alter_test; diff --git a/dbms/tests/queries/0_stateless/00030_2_alter_table.reference b/dbms/tests/queries/0_stateless/00030_2_alter_table.reference index 8c47f345849..fad8ec5ca08 100644 --- a/dbms/tests/queries/0_stateless/00030_2_alter_table.reference +++ b/dbms/tests/queries/0_stateless/00030_2_alter_table.reference @@ -5,3 +5,7 @@ VisitID UInt32 Added0 String Added1 UInt32 Added2 UInt32 +AddedNested1.A Array(UInt32) +AddedNested1.C Array(String) +AddedNested2.A Array(UInt32) +AddedNested2.B Array(UInt64) diff --git a/dbms/tests/queries/0_stateless/00030_2_alter_table.sql b/dbms/tests/queries/0_stateless/00030_2_alter_table.sql index d6fd3cf4a4a..0d890122e01 100644 --- a/dbms/tests/queries/0_stateless/00030_2_alter_table.sql +++ b/dbms/tests/queries/0_stateless/00030_2_alter_table.sql @@ -5,4 +5,6 @@ ALTER TABLE alter_test MODIFY COLUMN Added0 String; ALTER TABLE alter_test DROP COLUMN `NestedColumn.A`; ALTER TABLE alter_test DROP COLUMN `NestedColumn.S`; +ALTER TABLE alter_test DROP COLUMN `AddedNested1.B`; + DESC TABLE alter_test; diff --git a/dbms/tests/queries/0_stateless/00030_3_alter_table.reference b/dbms/tests/queries/0_stateless/00030_3_alter_table.reference index 123652833e9..ed55f8887ff 100644 --- a/dbms/tests/queries/0_stateless/00030_3_alter_table.reference +++ b/dbms/tests/queries/0_stateless/00030_3_alter_table.reference @@ -1 +1 @@ -1 2014-01-01 2 3 0 0 +1 2014-01-01 2 3 0 0 [] [] [] []