From 1d7614746add05297aa44968defd1ff19bcceb72 Mon Sep 17 00:00:00 2001 From: FawnD2 Date: Sun, 8 Nov 2020 04:32:27 +0300 Subject: [PATCH] Fix issue with locale. Move helper script out of tests folder --- .../0_stateless/00900_parquet_load.reference | 50 +++++++++---------- .../queries/0_stateless/00900_parquet_load.sh | 4 +- .../00900_parquet_create_table_columns.py | 0 3 files changed, 27 insertions(+), 27 deletions(-) rename tests/queries/0_stateless/{ => helpers}/00900_parquet_create_table_columns.py (100%) diff --git a/tests/queries/0_stateless/00900_parquet_load.reference b/tests/queries/0_stateless/00900_parquet_load.reference index 6c5f42cbd63..3311e03d7f8 100644 --- a/tests/queries/0_stateless/00900_parquet_load.reference +++ b/tests/queries/0_stateless/00900_parquet_load.reference @@ -94,6 +94,31 @@ Code: 33. DB::Ex---tion: Error while reading Parquet data: IOError: Not yet impl 1552 1552 1552 +=== Try load data from fixed_length_decimal.parquet +1.00 +2.00 +3.00 +4.00 +5.00 +6.00 +7.00 +8.00 +9.00 +10.00 +11.00 +12.00 +13.00 +14.00 +15.00 +16.00 +17.00 +18.00 +19.00 +20.00 +21.00 +22.00 +23.00 +24.00 === Try load data from fixed_length_decimal_1.parquet 1.00 2.00 @@ -144,31 +169,6 @@ Code: 33. DB::Ex---tion: Error while reading Parquet data: IOError: Not yet impl 22.00 23.00 24.00 -=== Try load data from fixed_length_decimal.parquet -1.00 -2.00 -3.00 -4.00 -5.00 -6.00 -7.00 -8.00 -9.00 -10.00 -11.00 -12.00 -13.00 -14.00 -15.00 -16.00 -17.00 -18.00 -19.00 -20.00 -21.00 -22.00 -23.00 -24.00 === Try load data from hadoop_lz4_compressed.parquet 1593604800 abc 42 1593604800 def 7.7 diff --git a/tests/queries/0_stateless/00900_parquet_load.sh b/tests/queries/0_stateless/00900_parquet_load.sh index aa9a0a9d659..290a581aead 100755 --- a/tests/queries/0_stateless/00900_parquet_load.sh +++ b/tests/queries/0_stateless/00900_parquet_load.sh @@ -32,7 +32,7 @@ DATA_DIR=$CUR_DIR/data_parquet # ../contrib/arrow/cpp/src/arrow/array/array_nested.cc:193: Check failed: self->list_type_->value_type()->Equals(data->child_data[0]->type) # ClickHouse Parquet reader doesn't support such complex types, so I didn't burrow into the issue -for NAME in $(find "$DATA_DIR"/*.parquet -print0 | xargs -0 -n 1 basename | sort); do +for NAME in $(find "$DATA_DIR"/*.parquet -print0 | xargs -0 -n 1 basename | LC_ALL=C sort); do echo === Try load data from "$NAME" JSON=$DATA_DIR/$NAME.json @@ -40,7 +40,7 @@ for NAME in $(find "$DATA_DIR"/*.parquet -print0 | xargs -0 -n 1 basename | sort # If you want change or add .parquet file - rm data_parquet/*.json data_parquet/*.columns [ -n "$PARQUET_READER" ] && [ ! -s "$COLUMNS_FILE" ] && [ ! -s "$JSON" ] && "$PARQUET_READER" --json "$DATA_DIR"/"$NAME" > "$JSON" - [ ! -s "$COLUMNS_FILE" ] && "$CUR_DIR"/00900_parquet_create_table_columns.py "$JSON" > "$COLUMNS_FILE" + [ ! -s "$COLUMNS_FILE" ] && "$CUR_DIR"/helpers/00900_parquet_create_table_columns.py "$JSON" > "$COLUMNS_FILE" # Debug only: # [ -n "$PARQUET_READER" ] && $PARQUET_READER $DATA_DIR/$NAME > $DATA_DIR/$NAME.dump diff --git a/tests/queries/0_stateless/00900_parquet_create_table_columns.py b/tests/queries/0_stateless/helpers/00900_parquet_create_table_columns.py similarity index 100% rename from tests/queries/0_stateless/00900_parquet_create_table_columns.py rename to tests/queries/0_stateless/helpers/00900_parquet_create_table_columns.py