From 42d7621aeeb0f5cae0e58bfed0e8165afbb9a005 Mon Sep 17 00:00:00 2001 From: Pavel Kruglov Date: Thu, 13 May 2021 10:20:24 +0300 Subject: [PATCH] Change tests --- ...et.reference => 00900_long_parquet.reference} | 0 ...900_parquet_long.sh => 00900_long_parquet.sh} | 0 ...ence => 00900_long_parquet_decimal.reference} | 0 ...mal_long.sh => 00900_long_parquet_decimal.sh} | 0 ...ference => 00900_long_parquet_load.reference} | 0 ...t_load_long.sh => 00900_long_parquet_load.sh} | 0 .../0_stateless/00900_orc_arrays_load.reference | 2 ++ .../queries/0_stateless/00900_orc_arrays_load.sh | 13 ++++++++----- .../00900_orc_nested_arrays_load.reference | 1 + .../0_stateless/00900_orc_nested_arrays_load.sh | 13 ++++++++----- .../00900_orc_nullable_arrays_load.reference | 3 +++ .../00900_orc_nullable_arrays_load.sh | 11 ++++++----- .../queries/0_stateless/data_orc/array_test.orc | Bin 3905 -> 0 bytes .../0_stateless/data_orc/nested_array_test.orc | Bin 1352 -> 0 bytes .../0_stateless/data_orc/nullable_array_test.orc | Bin 720 -> 0 bytes 15 files changed, 28 insertions(+), 15 deletions(-) rename tests/queries/0_stateless/{00900_parquet.reference => 00900_long_parquet.reference} (100%) rename tests/queries/0_stateless/{00900_parquet_long.sh => 00900_long_parquet.sh} (100%) rename tests/queries/0_stateless/{00900_parquet_decimal.reference => 00900_long_parquet_decimal.reference} (100%) rename tests/queries/0_stateless/{00900_parquet_decimal_long.sh => 00900_long_parquet_decimal.sh} (100%) rename tests/queries/0_stateless/{00900_parquet_load.reference => 00900_long_parquet_load.reference} (100%) rename tests/queries/0_stateless/{00900_parquet_load_long.sh => 00900_long_parquet_load.sh} (100%) delete mode 100644 tests/queries/0_stateless/data_orc/array_test.orc delete mode 100644 tests/queries/0_stateless/data_orc/nested_array_test.orc delete mode 100644 tests/queries/0_stateless/data_orc/nullable_array_test.orc diff --git a/tests/queries/0_stateless/00900_parquet.reference b/tests/queries/0_stateless/00900_long_parquet.reference similarity index 100% rename from tests/queries/0_stateless/00900_parquet.reference rename to tests/queries/0_stateless/00900_long_parquet.reference diff --git a/tests/queries/0_stateless/00900_parquet_long.sh b/tests/queries/0_stateless/00900_long_parquet.sh similarity index 100% rename from tests/queries/0_stateless/00900_parquet_long.sh rename to tests/queries/0_stateless/00900_long_parquet.sh diff --git a/tests/queries/0_stateless/00900_parquet_decimal.reference b/tests/queries/0_stateless/00900_long_parquet_decimal.reference similarity index 100% rename from tests/queries/0_stateless/00900_parquet_decimal.reference rename to tests/queries/0_stateless/00900_long_parquet_decimal.reference diff --git a/tests/queries/0_stateless/00900_parquet_decimal_long.sh b/tests/queries/0_stateless/00900_long_parquet_decimal.sh similarity index 100% rename from tests/queries/0_stateless/00900_parquet_decimal_long.sh rename to tests/queries/0_stateless/00900_long_parquet_decimal.sh diff --git a/tests/queries/0_stateless/00900_parquet_load.reference b/tests/queries/0_stateless/00900_long_parquet_load.reference similarity index 100% rename from tests/queries/0_stateless/00900_parquet_load.reference rename to tests/queries/0_stateless/00900_long_parquet_load.reference diff --git a/tests/queries/0_stateless/00900_parquet_load_long.sh b/tests/queries/0_stateless/00900_long_parquet_load.sh similarity index 100% rename from tests/queries/0_stateless/00900_parquet_load_long.sh rename to tests/queries/0_stateless/00900_long_parquet_load.sh diff --git a/tests/queries/0_stateless/00900_orc_arrays_load.reference b/tests/queries/0_stateless/00900_orc_arrays_load.reference index de31dfebd77..9b20ef98164 100644 --- a/tests/queries/0_stateless/00900_orc_arrays_load.reference +++ b/tests/queries/0_stateless/00900_orc_arrays_load.reference @@ -1,2 +1,4 @@ [1,-2,3] [1,2,3] [100,-200,300] [100,200,300] [10000000,-20000000,30000000] [10000000,2000000,3000000] [100000000000000,-200000000000,3000000000000] [100000000000000,20000000000000,3000000000000] ['Some string','Some string','Some string'] ['0000','1111','2222'] [42.42,424.2,0.4242] [424242.424242,4242042420.242424,42] ['2000-01-01','2001-01-01','2002-01-01'] ['2000-01-01 00:00:00','2001-01-01 00:00:00','2002-01-01 00:00:00'] [0.20,10.00,4.00] [4.00,10000.10,10000.10] [1000000000.00,90.00,101001.01] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] +[1,-2,3] [1,2,3] [100,-200,300] [100,200,300] [10000000,-20000000,30000000] [10000000,2000000,3000000] [100000000000000,-200000000000,3000000000000] [100000000000000,20000000000000,3000000000000] ['Some string','Some string','Some string'] ['0000','1111','2222'] [42.42,424.2,0.4242] [424242.424242,4242042420.242424,42] ['2000-01-01','2001-01-01','2002-01-01'] ['2000-01-01 00:00:00','2001-01-01 00:00:00','2002-01-01 00:00:00'] [0.20,10.00,4.00] [4.00,10000.10,10000.10] [1000000000.00,90.00,101001.01] +[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] diff --git a/tests/queries/0_stateless/00900_orc_arrays_load.sh b/tests/queries/0_stateless/00900_orc_arrays_load.sh index 8aa8e05bbc2..270bc0037e9 100755 --- a/tests/queries/0_stateless/00900_orc_arrays_load.sh +++ b/tests/queries/0_stateless/00900_orc_arrays_load.sh @@ -4,11 +4,14 @@ CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh . "$CUR_DIR"/../shell_config.sh -DATA_FILE=$CUR_DIR/data_orc/array_test.orc - ${CLICKHOUSE_CLIENT} --query="DROP TABLE IF EXISTS orc_load" ${CLICKHOUSE_CLIENT} --query="CREATE TABLE orc_arrays (arr1 Array(Int8), arr2 Array(UInt8), arr3 Array(Int16), arr4 Array(UInt16), arr5 Array(Int32), arr6 Array(UInt32), arr7 Array(Int64), arr8 Array(UInt64), arr9 Array(String), arr10 Array(FixedString(4)), arr11 Array(Float32), arr12 Array(Float64), arr13 Array(Date), arr14 Array(Datetime), arr15 Array(Decimal(4, 2)), arr16 Array(Decimal(10, 2)), arr17 Array(Decimal(25, 2))) ENGINE=Memory()" -cat "$DATA_FILE" | ${CLICKHOUSE_CLIENT} -q "insert into orc_arrays format ORC" -${CLICKHOUSE_CLIENT} --query="select * from orc_arrays" -${CLICKHOUSE_CLIENT} --query="drop table orc_arrays" +${CLICKHOUSE_CLIENT} --query="INSERT INTO orc_arrays VALUES ([1,-2,3],[1,2,3],[100,-200,300],[100,200,300],[10000000,-20000000,30000000],[10000000,2000000,3000000],[100000000000000,-200000000000,3000000000000],[100000000000000,20000000000000,3000000000000],['Some string','Some string','Some string'],['0000','1111','2222'],[42.42,424.2,0.4242],[424242.424242,4242042420.242424,42],['2000-01-01','2001-01-01','2002-01-01'],['2000-01-01 00:00:00','2001-01-01 00:00:00','2002-01-01 00:00:00'],[0.20,10.00,4.00],[4.00,10000.10,10000.10],[1000000000.00,90.00,101001.01]),([],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[])" + +${CLICKHOUSE_CLIENT} --query="SELECT * FROM orc_arrays FORMAT ORC" > "${CLICKHOUSE_TMP}"/arrays.orc + +cat "${CLICKHOUSE_TMP}"/arrays.orc | ${CLICKHOUSE_CLIENT} -q "INSERT INTO orc_arrays FORMAT ORC" + +${CLICKHOUSE_CLIENT} --query="SELECT * FROM orc_arrays" +${CLICKHOUSE_CLIENT} --query="DROP TABLE orc_arrays" diff --git a/tests/queries/0_stateless/00900_orc_nested_arrays_load.reference b/tests/queries/0_stateless/00900_orc_nested_arrays_load.reference index aef31fc1b60..dd9c9900684 100644 --- a/tests/queries/0_stateless/00900_orc_nested_arrays_load.reference +++ b/tests/queries/0_stateless/00900_orc_nested_arrays_load.reference @@ -1 +1,2 @@ [[[1,2,3],[1,2,3]],[[1,2,3]],[[],[1,2,3]]] [[['Some string','Some string'],[]],[['Some string']],[[]]] [[NULL,1,2],[NULL],[1,2],[]] [['Some string',NULL,'Some string'],[NULL],[]] +[[[1,2,3],[1,2,3]],[[1,2,3]],[[],[1,2,3]]] [[['Some string','Some string'],[]],[['Some string']],[[]]] [[NULL,1,2],[NULL],[1,2],[]] [['Some string',NULL,'Some string'],[NULL],[]] diff --git a/tests/queries/0_stateless/00900_orc_nested_arrays_load.sh b/tests/queries/0_stateless/00900_orc_nested_arrays_load.sh index 685e380d3f8..81d2aeed4bd 100755 --- a/tests/queries/0_stateless/00900_orc_nested_arrays_load.sh +++ b/tests/queries/0_stateless/00900_orc_nested_arrays_load.sh @@ -4,11 +4,14 @@ CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh . "$CUR_DIR"/../shell_config.sh -DATA_FILE=$CUR_DIR/data_orc/nested_array_test.orc - ${CLICKHOUSE_CLIENT} --query="DROP TABLE IF EXISTS orc_nested_arrays" ${CLICKHOUSE_CLIENT} --query="CREATE TABLE orc_nested_arrays (arr1 Array(Array(Array(UInt32))), arr2 Array(Array(Array(String))), arr3 Array(Array(Nullable(UInt32))), arr4 Array(Array(Nullable(String)))) engine=Memory()" -cat "$DATA_FILE" | ${CLICKHOUSE_CLIENT} -q "insert into orc_nested_arrays format ORC" -${CLICKHOUSE_CLIENT} --query="select * from orc_nested_arrays" -${CLICKHOUSE_CLIENT} --query="drop table orc_nested_arrays" +${CLICKHOUSE_CLIENT} --query="INSERT INTO orc_nested_arrays VALUES ([[[1,2,3],[1,2,3]],[[1,2,3]],[[],[1,2,3]]],[[['Some string','Some string'],[]],[['Some string']],[[]]],[[NULL,1,2],[NULL],[1,2],[]],[['Some string',NULL,'Some string'],[NULL],[]])" + +${CLICKHOUSE_CLIENT} --query="SELECT * FROM orc_nested_arrays FORMAT ORC" > "${CLICKHOUSE_TMP}"/nested_arrays.orc + +cat "${CLICKHOUSE_TMP}"/nested_arrays.orc | ${CLICKHOUSE_CLIENT} -q "INSERT INTO orc_nested_arrays FORMAT ORC" + +${CLICKHOUSE_CLIENT} --query="SELECT * FROM orc_nested_arrays" +${CLICKHOUSE_CLIENT} --query="DROP table orc_nested_arrays" diff --git a/tests/queries/0_stateless/00900_orc_nullable_arrays_load.reference b/tests/queries/0_stateless/00900_orc_nullable_arrays_load.reference index 19379b16138..62e95652040 100644 --- a/tests/queries/0_stateless/00900_orc_nullable_arrays_load.reference +++ b/tests/queries/0_stateless/00900_orc_nullable_arrays_load.reference @@ -1,3 +1,6 @@ [1,NULL,2] [NULL,'Some string',NULL] [0.00,NULL,42.42] [NULL] [NULL] [NULL] [] [] [] +[1,NULL,2] [NULL,'Some string',NULL] [0.00,NULL,42.42] +[NULL] [NULL] [NULL] +[] [] [] diff --git a/tests/queries/0_stateless/00900_orc_nullable_arrays_load.sh b/tests/queries/0_stateless/00900_orc_nullable_arrays_load.sh index 40312c2e2cf..f1217df735a 100755 --- a/tests/queries/0_stateless/00900_orc_nullable_arrays_load.sh +++ b/tests/queries/0_stateless/00900_orc_nullable_arrays_load.sh @@ -4,11 +4,12 @@ CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh . "$CUR_DIR"/../shell_config.sh -DATA_FILE=$CUR_DIR/data_orc/nullable_array_test.orc - ${CLICKHOUSE_CLIENT} --query="DROP TABLE IF EXISTS orc_nullable_arrays" ${CLICKHOUSE_CLIENT} --query="CREATE TABLE orc_nullable_arrays (arr1 Array(Nullable(UInt32)), arr2 Array(Nullable(String)), arr3 Array(Nullable(Decimal(4, 2)))) ENGINE=Memory()" -cat "$DATA_FILE" | ${CLICKHOUSE_CLIENT} -q "insert into orc_nullable_arrays format ORC" -${CLICKHOUSE_CLIENT} --query="select * from orc_nullable_arrays" +${CLICKHOUSE_CLIENT} --query="INSERT INTO orc_nullable_arrays VALUES ([1,NULL,2],[NULL,'Some string',NULL],[0.00,NULL,42.42]),([NULL],[NULL],[NULL]),([],[],[])" +${CLICKHOUSE_CLIENT} --query="SELECT * FROM orc_nullable_arrays FORMAT ORC" > "${CLICKHOUSE_TMP}"/nullable_arrays.orc -${CLICKHOUSE_CLIENT} --query="drop table orc_nullable_arrays" +cat "${CLICKHOUSE_TMP}"/nullable_arrays.orc | ${CLICKHOUSE_CLIENT} -q "INSERT INTO orc_nullable_arrays FORMAT ORC" + +${CLICKHOUSE_CLIENT} --query="SELECT * FROM orc_nullable_arrays" +${CLICKHOUSE_CLIENT} --query="DROP TABLE orc_nullable_arrays" diff --git a/tests/queries/0_stateless/data_orc/array_test.orc b/tests/queries/0_stateless/data_orc/array_test.orc deleted file mode 100644 index 1a468e3489cf0b21bff0bf38e84d7e5d05108573..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3905 zcmds3+iM(E7@wIlvwL>-HapqPo}FwqyNlM;YM4#a#`HncgrW%AQtKZeC?a@)>Qg}( zA`&9CE$UON5CkbGgrHR)l$zqLzSIze)@ww4P=q!}t@vQ$nQwkG*;~5ptHW}>^SgX! zcFr8W`S$LgHj^e(6vfuLwoftBrXfKD3n5H#X2&?QVnXlf(xfZZ=@Q{uS-Dn%A7$1B zT^wUQjb~NgxR~fPR>Bnva>XoPe|N6W@{XJ<3-8oiUr)RD@@3WXzWp>IyxEhPPWzT{ z^+CCMk*|Mz@yJTj^1PMVpFg@?c-{}^S64?m({2gVDl$!QZ|R>Ozgmzt3iFo!I`!G# zMOiDn=RP}m z9hov`&tz`x%yRCPT!Cj_y3!`>^x`p zW`s9${*9N$tKQ0MfBdqm(|=R6BMxVyc~f^sMqS%zxFfFX7>zNBI+JdVlBzPvG4(O& zwt2&q*GR*4_^6z8Pu&rvZj-4uo5qBHCp%5Kem>opV8d;=6O9qKu}@iFT3@=#l=Ywf zRj;yWszuYY>QQzy7J*CZ1wcXH`(gi>$85Lfik?DotFnb+?e^;t8<6s zZ-epXKbZa9SU#-2cx720WZjJMn5Bp`MO9=eYNAMy0qej9a7;L)$ALL;0@xH)(v!d` z;52YX43nM(w!~J#Ibd7l3HJf#feXO>VjJm2U;$hLc0`Hv0pPNz5gr7th%JPNfUDv* z!ZqN!7?)U)`=U`)DQcD~7-5aDYH7mXKgD9u8FU@G4&8umK#xI>i8$rQp~sV{PY zKM3C-a0R}KFvwQ{KLpAA)mj9ujXt6o`%OcDucJq3 zGs^P4NlOqI+Z%v@?f$V3v}=9Y14r-Ac;LH{Z?Hdf|FeA5!=@G)iqM5ElwEqOUs|6cdZK2JOuD8%7S97&p zbha?Il!_J(r2<@gsc4}$N(JcdrJ_Y_FBK54T`FMeQ7YhyN<|Bnr2@Ejsc1KDS}I^{ zD-~e7mI`RsC>3z@EEVwGNU4}ScKA0nX$e5r%V3<2)%cW diff --git a/tests/queries/0_stateless/data_orc/nested_array_test.orc b/tests/queries/0_stateless/data_orc/nested_array_test.orc deleted file mode 100644 index c0cde3db0572953d4964470233e8e775e544c0ac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1352 zcmcIjy>1gh5T5pZ42te!jUI&m0{exZEiKXtWh8aHY$T+(gyTn<2f`2N$+z zjFq+Vi(%B3XVC>a%__IJphF*l4OM(cOUKW6S2bIvQ6my8v~1J;$82elxSj8IGF z(rfZ7=E@u5+ABm+j!l1(fN?hM^l)?0%o~& zjgTo(DbY;u82UnhevL!AnJl5