mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
test for null_array_orc_load
This commit is contained in:
parent
e5f49477a6
commit
6e9589f6ab
@ -0,0 +1,3 @@
|
|||||||
|
[0] ['Test 0']
|
||||||
|
[NULL] [NULL]
|
||||||
|
[] []
|
27
tests/queries/0_stateless/00900_null_array_orc_load.sh
Normal file
27
tests/queries/0_stateless/00900_null_array_orc_load.sh
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||||
|
# shellcheck source=../shell_config.sh
|
||||||
|
. "$CUR_DIR"/../shell_config.sh
|
||||||
|
|
||||||
|
DATA_FILE=$CUR_DIR/data_orc/test_null_array.orc
|
||||||
|
|
||||||
|
${CLICKHOUSE_CLIENT} --query="DROP TABLE IF EXISTS test_null_array_orc"
|
||||||
|
${CLICKHOUSE_CLIENT} --query="CREATE TABLE test_null_array_orc(col0 Array(Nullable(Int64)),col1 Array(Nullable(String))) ENGINE = Memory"
|
||||||
|
cat "$DATA_FILE" | ${CLICKHOUSE_CLIENT} -q "insert into test_null_array_orc format ORC"
|
||||||
|
${CLICKHOUSE_CLIENT} --query="select * from test_null_array_orc"
|
||||||
|
|
||||||
|
${CLICKHOUSE_CLIENT} --query="drop table test_null_array_orc"
|
||||||
|
|
||||||
|
#
|
||||||
|
# test_null_array.orc is impossible to create using CH because it stores NULL instead of empty array
|
||||||
|
# but CH able to ingest it as empty array []
|
||||||
|
#
|
||||||
|
# import pyorc
|
||||||
|
# with open("test_null_array.orc", "wb") as data:
|
||||||
|
# with pyorc.Writer(data, "struct<col0:array<int>,col1:array<string>>") as writer:
|
||||||
|
# writer.write(([0], ["Test 0"]))
|
||||||
|
# writer.write(([None], [None]))
|
||||||
|
# writer.write((None, None))
|
||||||
|
#
|
||||||
|
#
|
BIN
tests/queries/0_stateless/data_orc/test_null_array.orc
Normal file
BIN
tests/queries/0_stateless/data_orc/test_null_array.orc
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user