mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-05 05:52:05 +00:00
c5ffbc688e
Parsing SETTINGS after FORMAT, that has been introduced in [1], can interpret SETTING as some values, which is misleading. [1]: https://github.com/ClickHouse/ClickHouse/pull/4174/files#diff-ba7bd0657630b1cd94cf6ed364bd857338096f49f66dc82918438d6745753775R106 Note, that we are touching only INSERT queries, not SELECT, since this is a backward incompatible change, and in case of modifying SELECT it can break too much. Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com> Fixes: #35100 Fixes: #20343
27 lines
1.0 KiB
Bash
Executable File
27 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Tags: no-fasttest
|
|
|
|
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
# shellcheck source=../shell_config.sh
|
|
. "$CUR_DIR"/../shell_config.sh
|
|
|
|
${CLICKHOUSE_CLIENT} --query="DROP TABLE IF EXISTS nested_table"
|
|
${CLICKHOUSE_CLIENT} --query="DROP TABLE IF EXISTS nested_nested_table"
|
|
|
|
${CLICKHOUSE_CLIENT} --query="CREATE TABLE nested_table (table Nested(eLeM1 Int32, elEm2 String, ELEM3 Float32)) engine=Memory"
|
|
|
|
formats=('Arrow' 'Parquet' 'ORC')
|
|
format_files=('arrow' 'parquet' 'orc')
|
|
|
|
for ((i = 0; i < 3; i++)) do
|
|
echo ${formats[i]}
|
|
|
|
${CLICKHOUSE_CLIENT} --query="TRUNCATE TABLE nested_table"
|
|
cat $CUR_DIR/data_orc_arrow_parquet_nested/nested_table.${format_files[i]} | ${CLICKHOUSE_CLIENT} -q "INSERT INTO nested_table SETTINGS input_format_${format_files[i]}_import_nested = 1, input_format_${format_files[i]}_case_insensitive_column_matching = true FORMAT ${formats[i]}"
|
|
|
|
${CLICKHOUSE_CLIENT} --query="SELECT * FROM nested_table"
|
|
|
|
done
|
|
|
|
${CLICKHOUSE_CLIENT} --query="DROP TABLE nested_table"
|