From 887eeddeb6b3290559d4f3bf49efbcc9369ef6ef Mon Sep 17 00:00:00 2001 From: RogerYK Date: Wed, 26 Jan 2022 20:30:15 +0800 Subject: [PATCH] Fix test --- ..._functions_concat_slice_push_pop.reference | 48 +++++++++---------- .../01060_substring_negative_size.sql | 14 ++---- 2 files changed, 29 insertions(+), 33 deletions(-) diff --git a/tests/queries/0_stateless/00498_array_functions_concat_slice_push_pop.reference b/tests/queries/0_stateless/00498_array_functions_concat_slice_push_pop.reference index f757a86aeee..f0d66bd49eb 100644 --- a/tests/queries/0_stateless/00498_array_functions_concat_slice_push_pop.reference +++ b/tests/queries/0_stateless/00498_array_functions_concat_slice_push_pop.reference @@ -217,12 +217,12 @@ arraySlice(arr1, -4, 2) arraySlice(arr1, -4, -1) [] 2 4 [] [] 2 4 [] -[1,2,3,4,5] 2 4 [] -[1,2,3,4,5,6,7] 2 4 [4,5] -[1,2,3,4,5,6,7] 2 4 [4,5] -[1,2,3,4,5,6,7] 2 4 [4,5] -[1,2,3,4,5,6,7] 2 4 [4,5] -[1,2,3,4,5,6,7] 2 4 [4,5] +[1,2,3,4,5] 2 4 [2,3,4] +[1,2,3,4,5,6,7] 2 4 [4,5,6] +[1,2,3,4,5,6,7] 2 4 [4,5,6] +[1,2,3,4,5,6,7] 2 4 [4,5,6] +[1,2,3,4,5,6,7] 2 4 [4,5,6] +[1,2,3,4,5,6,7] 2 4 [4,5,6] arrayPushFront(arr1, 1) [] [1] [] [1] @@ -504,12 +504,12 @@ arraySlice(arr1, -4, 2) arraySlice(arr1, -4, -1) [] 2 4 [] [] 2 4 [] -[1,2,3,4,5] 2 4 [] -[1,NULL,3,4,NULL,6,7] 2 4 [4,NULL] -[1,2,3,NULL,5,6,7] 2 4 [NULL,5] -[1,2,3,4,5,NULL,7] 2 4 [4,5] -[1,2,3,4,5,6,7] 2 4 [4,5] -[1,NULL,3,NULL,5,6,7] 2 4 [NULL,5] +[1,2,3,4,5] 2 4 [2,3,4] +[1,NULL,3,4,NULL,6,7] 2 4 [4,NULL,6] +[1,2,3,NULL,5,6,7] 2 4 [NULL,5,6] +[1,2,3,4,5,NULL,7] 2 4 [4,5,NULL] +[1,2,3,4,5,6,7] 2 4 [4,5,6] +[1,NULL,3,NULL,5,6,7] 2 4 [NULL,5,6] arrayPushFront(arr1, 1) [] [1] [] [1] @@ -817,12 +817,12 @@ arraySlice(arr1, -4, 2) arraySlice(arr1, -4, -1) [] 2 4 [] [] 2 4 [] -[1,2,3,4,5] 2 4 [] -[1,NULL,3,4,NULL,6,7] 2 4 [4,NULL] -[1,2,3,NULL,5,6,7] 2 4 [NULL,5] -[1,2,3,4,5,NULL,7] 2 4 [4,5] -[1,2,3,4,5,6,7] 2 4 [4,5] -[1,NULL,3,NULL,5,6,7] 2 4 [NULL,5] +[1,2,3,4,5] 2 4 [2,3,4] +[1,NULL,3,4,NULL,6,7] 2 4 [4,NULL,6] +[1,2,3,NULL,5,6,7] 2 4 [NULL,5,6] +[1,2,3,4,5,NULL,7] 2 4 [4,5,NULL] +[1,2,3,4,5,6,7] 2 4 [4,5,6] +[1,NULL,3,NULL,5,6,7] 2 4 [NULL,5,6] arrayPushFront(arr1, 1) [] [1] [] [1] @@ -1104,12 +1104,12 @@ arraySlice(arr1, -4, 2) arraySlice(arr1, -4, -1) [] 2 4 [] [] 2 4 [] -['1','2','3','4','5'] 2 4 [] -['1',NULL,'3','4',NULL,'6','7'] 2 4 ['4',NULL] -['1','2','3',NULL,'5','6','7'] 2 4 [NULL,'5'] -['1','2','3','4','5',NULL,'7'] 2 4 ['4','5'] -['1','2','3','4','5','6','7'] 2 4 ['4','5'] -['1',NULL,'3',NULL,'5','6','7'] 2 4 [NULL,'5'] +['1','2','3','4','5'] 2 4 ['2','3','4'] +['1',NULL,'3','4',NULL,'6','7'] 2 4 ['4',NULL,'6'] +['1','2','3',NULL,'5','6','7'] 2 4 [NULL,'5','6'] +['1','2','3','4','5',NULL,'7'] 2 4 ['4','5',NULL] +['1','2','3','4','5','6','7'] 2 4 ['4','5','6'] +['1',NULL,'3',NULL,'5','6','7'] 2 4 [NULL,'5','6'] arrayPushFront(arr1, 1) [] ['1'] [] ['1'] diff --git a/tests/queries/0_stateless/01060_substring_negative_size.sql b/tests/queries/0_stateless/01060_substring_negative_size.sql index daae2c5072b..321644db2fa 100644 --- a/tests/queries/0_stateless/01060_substring_negative_size.sql +++ b/tests/queries/0_stateless/01060_substring_negative_size.sql @@ -38,9 +38,8 @@ create table t l Int8, r Int8 ) engine = Memory; -insert into t -values ('abcdefgh', 2, -2), - ('12345678', 3, -3); +insert into t(s, l, r) +values ('abcdefgh', 2, -2),('12345678', 3, -3); select substring(s, 2, -2) from t; @@ -61,8 +60,7 @@ create table t r Int8 ) engine = Memory; insert into t -values ('abcdefgh', -2, -2), - ('12345678', -3, -3); +values ('abcdefgh', -2, -2),('12345678', -3, -3); select substring(s, -2, -2) from t; @@ -83,8 +81,7 @@ create table t r Int8 ) engine = Memory; insert into t -values ('abcdefgh', 2, -2), - ('12345678', 3, -3); +values ('abcdefgh', 2, -2),('12345678', 3, -3); select substring(s, 2, -2) from t; @@ -105,8 +102,7 @@ create table t r Int8 ) engine = Memory; insert into t -values ('abcdefgh', -2, -2), - ('12345678', -3, -3); +values ('abcdefgh', -2, -2),('12345678', -3, -3); select substring(s, -2, -2) from t;