ClickHouse/tests/queries/0_stateless/01273_arrow_load.sh

20 lines
961 B
Bash
Raw Normal View History

2020-05-05 02:06:19 +00:00
#!/usr/bin/env bash
2021-09-12 12:35:27 +00:00
# Tags: no-unbundled, no-fasttest
2020-05-05 02:06:19 +00:00
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
2020-12-28 11:46:53 +00:00
# shellcheck source=../shell_config.sh
. "$CUR_DIR"/../shell_config.sh
2020-05-05 02:06:19 +00:00
CB_DIR=$(dirname "$CLICKHOUSE_CLIENT_BINARY")
[ "$CB_DIR" == "." ] && ROOT_DIR=$CUR_DIR/../../../..
[ -z "$ROOT_DIR" ] && ROOT_DIR=$CB_DIR/../../..
DATA_FILE=$CUR_DIR/data_arrow/test.arrow
${CLICKHOUSE_CLIENT} --query="DROP TABLE IF EXISTS arrow_load"
2021-02-22 16:22:09 +00:00
${CLICKHOUSE_CLIENT} --query="CREATE TABLE arrow_load (bool UInt8, int8 Int8, int16 Int16, int32 Int32, int64 Int64, uint8 UInt8, uint16 UInt16, uint32 UInt32, uint64 UInt64, halffloat Float32, float Float32, double Float64, string String, date32 Date, date64 DateTime('Europe/Moscow'), timestamp DateTime('Europe/Moscow')) ENGINE = Memory"
cat "$DATA_FILE" | ${CLICKHOUSE_CLIENT} -q "insert into arrow_load format Arrow"
2020-05-05 02:06:19 +00:00
${CLICKHOUSE_CLIENT} --query="select * from arrow_load"
$CLICKHOUSE_CLIENT -q "DROP TABLE arrow_load"