2019-08-28 13:26:38 +00:00
|
|
|
#!/usr/bin/env bash
|
2021-11-21 10:58:26 +00:00
|
|
|
# Tags: no-ubsan, no-fasttest
|
2019-08-28 13:26:38 +00:00
|
|
|
|
|
|
|
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
2020-12-28 11:46:53 +00:00
|
|
|
# shellcheck source=../shell_config.sh
|
2020-08-01 00:56:32 +00:00
|
|
|
. "$CUR_DIR"/../shell_config.sh
|
2019-08-28 13:26:38 +00:00
|
|
|
|
|
|
|
${CLICKHOUSE_CLIENT} --query="DROP TABLE IF EXISTS orc_load"
|
2022-02-13 09:06:58 +00:00
|
|
|
${CLICKHOUSE_CLIENT} --query="CREATE TABLE orc_load (int Int32, smallint Int8, bigint Int64, float Float32, double Float64, date Date, y String, datetime64 DateTime64(3)) ENGINE = Memory"
|
|
|
|
${CLICKHOUSE_CLIENT} --query="insert into orc_load values (0, 0, 0, 0, 0, '2019-01-01', 'test1', toDateTime64('2019-01-01 02:03:04.567', 3)), (2147483647, -1, 9223372036854775806, 123.345345, 345345.3453451212, '2019-01-01', 'test2', toDateTime64('2019-01-01 02:03:04.567', 3))"
|
2022-06-01 14:58:24 +00:00
|
|
|
${CLICKHOUSE_CLIENT} --query="select * from orc_load FORMAT ORC" > "${CLICKHOUSE_TMP}"/test.orc
|
2022-02-13 09:06:58 +00:00
|
|
|
${CLICKHOUSE_CLIENT} --query="truncate table orc_load"
|
|
|
|
|
2022-06-01 14:58:24 +00:00
|
|
|
cat "${CLICKHOUSE_TMP}"/test.orc | ${CLICKHOUSE_CLIENT} -q "insert into orc_load format ORC"
|
2023-06-28 19:16:10 +00:00
|
|
|
${CLICKHOUSE_CLIENT} -q "insert into orc_load format ORC" < "${CLICKHOUSE_TMP}"/test.orc
|
2019-08-28 13:26:38 +00:00
|
|
|
${CLICKHOUSE_CLIENT} --query="select * from orc_load"
|
2020-11-11 15:29:36 +00:00
|
|
|
${CLICKHOUSE_CLIENT} --query="drop table orc_load"
|