diff --git a/tests/queries/0_stateless/03231_hive_partitioning_filtering.sh b/tests/queries/0_stateless/03231_hive_partitioning_filtering.sh index e545f53f257..d32d5596110 100755 --- a/tests/queries/0_stateless/03231_hive_partitioning_filtering.sh +++ b/tests/queries/0_stateless/03231_hive_partitioning_filtering.sh @@ -4,26 +4,31 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh . "$CURDIR"/../shell_config.sh -$CLICKHOUSE_LOCAL --query_id="test_03231_1" --query " - SELECT countDistinct(_path) FROM file('$CURDIR/data_hive/partitioning/column0=*/sample.parquet') WHERE column0 = 'Elizabeth' SETTINGS use_hive_partitioning=1; +DATA_DIR=$USER_FILES_PATH/$CLICKHOUSE_TEST_UNIQUE_NAME +mkdir -p $DATA_DIR +cp -r $CURDIR/data_hive/ $DATA_DIR + +$CLICKHOUSE_CLIENT --query_id="test_03231_1" --query " + SELECT countDistinct(_path) FROM file('$DATA_DIR/partitioning/column0=*/sample.parquet') WHERE column0 = 'Elizabeth' SETTINGS use_hive_partitioning=1; " -$CLICKHOUSE_LOCAL --query " +$CLICKHOUSE_CLIENT --query " SELECT ProfileEvents['EngineFileLikeReadFiles'] FROM system.query_log WHERE query_id='test_03231_1' AND current_database = currentDatabase(); " -$CLICKHOUSE_LOCAL --query_id="test_03231_2" --query " - SELECT countDistinct(_path) FROM file('$CURDIR/data_hive/partitioning/identifier=*/email.csv') WHERE identifier = 2070 SETTINGS use_hive_partitioning=1; +$CLICKHOUSE_CLIENT --query_id="test_03231_2" --query " + SELECT countDistinct(_path) FROM file('$DATA_DIR/partitioning/identifier=*/email.csv') WHERE identifier = 2070 SETTINGS use_hive_partitioning=1; " -$CLICKHOUSE_LOCAL --query " +$CLICKHOUSE_CLIENT --query " SELECT ProfileEvents['EngineFileLikeReadFiles'] FROM system.query_log WHERE query_id='test_03231_2' AND current_database = currentDatabase(); " -$CLICKHOUSE_LOCAL --query_id="test_03231_3" --query " - SELECT countDistinct(_path) FROM file('$CURDIR/data_hive/partitioning/array=*/sample.parquet') WHERE array = [1,2,3] SETTINGS use_hive_partitioning=1; +$CLICKHOUSE_CLIENT --query_id="test_03231_3" --query " + SELECT countDistinct(_path) FROM file('$DATA_DIR/partitioning/array=*/sample.parquet') WHERE array = [1,2,3] SETTINGS use_hive_partitioning=1; " -$CLICKHOUSE_LOCAL --query " +$CLICKHOUSE_CLIENT --query " SELECT ProfileEvents['EngineFileLikeReadFiles'] FROM system.query_log WHERE query_id='test_03231_3' AND current_database = currentDatabase(); " +rm -rf $DATA_DIR