Test for input_format_parquet_preserve_order

This commit is contained in:
Michael Kolupaev 2023-05-05 04:29:05 +00:00
parent 3bd1489f18
commit ddb99279f7
3 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,12 @@
0
1
2
(Expression)
ExpressionTransform
(ReadFromStorage)
File 0 → 1
(Expression)
ExpressionTransform × 2
(ReadFromStorage)
Resize 1 → 2
File 0 → 1

View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
# Tags: no-fasttest
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
# This file has a row group with 2 rows, then a row group with 1 row.
# It'll be read into two blocks. The first block will sleep 2x longer than the second.
# So reordering is very likely if the order-preservation doesn't work.
$CLICKHOUSE_LOCAL -q "select number+sleepEachRow(3) from file('$CURDIR/data_parquet/02725_data.parquet') settings input_format_parquet_preserve_order=1"
$CLICKHOUSE_LOCAL -q "explain pipeline select number+sleepEachRow(3) from file('$CURDIR/data_parquet/02725_data.parquet') settings input_format_parquet_preserve_order=1, max_threads=2"
$CLICKHOUSE_LOCAL -q "explain pipeline select number+sleepEachRow(3) from file('$CURDIR/data_parquet/02725_data.parquet') settings input_format_parquet_preserve_order=0, parallelize_output_from_storages=1, max_threads=2"