diff --git a/tests/queries/0_stateless/02048_parallel_reading_from_infile.reference b/tests/queries/0_stateless/02048_parallel_reading_from_infile.reference index 099b7d91c92..98c00d52990 100644 --- a/tests/queries/0_stateless/02048_parallel_reading_from_infile.reference +++ b/tests/queries/0_stateless/02048_parallel_reading_from_infile.reference @@ -1,4 +1,5 @@ 1 2 +Correct 1 2 diff --git a/tests/queries/0_stateless/02048_parallel_reading_from_infile.sh b/tests/queries/0_stateless/02048_parallel_reading_from_infile.sh index 460c97cd5ac..d53fe8dd305 100755 --- a/tests/queries/0_stateless/02048_parallel_reading_from_infile.sh +++ b/tests/queries/0_stateless/02048_parallel_reading_from_infile.sh @@ -8,23 +8,35 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) [ -e "${CLICKHOUSE_TMP}"/test_infile_parallel ] && rm "${CLICKHOUSE_TMP}"/test_infile_parallel [ -e "${CLICKHOUSE_TMP}"/test_infile_parallel ] && rm "${CLICKHOUSE_TMP}"/test_infile_parallel_1 [ -e "${CLICKHOUSE_TMP}"/test_infile_parallel ] && rm "${CLICKHOUSE_TMP}"/test_infile_parallel_2 - +[ -e "${CLICKHOUSE_TMP}"/test_infile_parallel ] && rm "${CLICKHOUSE_TMP}"/test_infile_parallel_3 echo -e "102\t2" > "${CLICKHOUSE_TMP}"/test_infile_parallel echo -e "102\tsecond" > "${CLICKHOUSE_TMP}"/test_infile_parallel_1 echo -e "103\tfirst" > "${CLICKHOUSE_TMP}"/test_infile_parallel_2 - -${CLICKHOUSE_CLIENT} --query "DROP TABLE IF EXISTS test_infile_parallel;" -${CLICKHOUSE_CLIENT} --query "CREATE TABLE test_infile_parallel (Id Int32,Value Enum('first' = 1, 'second' = 2)) ENGINE=Memory();" +echo -e "103" > "${CLICKHOUSE_TMP}"/test_infile_parallel_3 gzip "${CLICKHOUSE_TMP}"/test_infile_parallel -${CLICKHOUSE_CLIENT} --query "INSERT INTO test_infile_parallel FROM INFILE '${CLICKHOUSE_TMP}/test_infile_parallel*' FORMAT TSV;" -${CLICKHOUSE_CLIENT} --query "SELECT count() FROM test_infile_parallel WHERE Value='first';" -${CLICKHOUSE_CLIENT} --query "SELECT count() FROM test_infile_parallel WHERE Value='second';" +${CLICKHOUSE_CLIENT} --multiquery <&1 | grep -q "36" && echo "Correct" || echo 'Fail' ${CLICKHOUSE_LOCAL} --multiquery <