2020-08-06 08:57:50 +00:00
|
|
|
#!/usr/bin/env bash
|
2021-11-21 10:58:26 +00:00
|
|
|
# Tags: no-fasttest
|
2020-08-06 08:57:50 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
2020-12-28 11:46:53 +00:00
|
|
|
# shellcheck source=../shell_config.sh
|
2020-08-06 08:57:50 +00:00
|
|
|
. "$CUR_DIR"/../shell_config.sh
|
|
|
|
|
|
|
|
|
|
|
|
${CLICKHOUSE_CLIENT} --query="DROP TABLE IF EXISTS test_empty_data"
|
|
|
|
${CLICKHOUSE_CLIENT} --query="CREATE TABLE test_empty_data (x Int8) ENGINE = Memory"
|
|
|
|
|
|
|
|
(echo "INSERT INTO test_empty_data FORMAT Arrow" && ${CLICKHOUSE_CLIENT} --query="SELECT 1 AS x FORMAT Arrow") | ${CLICKHOUSE_CLIENT}
|
|
|
|
${CLICKHOUSE_CLIENT} --query="SELECT count() FROM test_empty_data"
|
|
|
|
(echo "INSERT INTO test_empty_data FORMAT Arrow" && ${CLICKHOUSE_CLIENT} --query="SELECT 1 AS x LIMIT 0 FORMAT Arrow") | ${CLICKHOUSE_CLIENT}
|
|
|
|
${CLICKHOUSE_CLIENT} --query="SELECT count() FROM test_empty_data"
|
|
|
|
(echo "INSERT INTO test_empty_data FORMAT ArrowStream" && ${CLICKHOUSE_CLIENT} --query="SELECT 1 AS x FORMAT ArrowStream") | ${CLICKHOUSE_CLIENT}
|
|
|
|
${CLICKHOUSE_CLIENT} --query="SELECT count() FROM test_empty_data"
|
|
|
|
(echo "INSERT INTO test_empty_data FORMAT ArrowStream" && ${CLICKHOUSE_CLIENT} --query="SELECT 1 AS x LIMIT 0 FORMAT ArrowStream") | ${CLICKHOUSE_CLIENT}
|
|
|
|
${CLICKHOUSE_CLIENT} --query="SELECT count() FROM test_empty_data"
|
|
|
|
(echo "INSERT INTO test_empty_data FORMAT Parquet" && ${CLICKHOUSE_CLIENT} --query="SELECT 1 AS x FORMAT Parquet") | ${CLICKHOUSE_CLIENT}
|
|
|
|
${CLICKHOUSE_CLIENT} --query="SELECT count() FROM test_empty_data"
|
|
|
|
(echo "INSERT INTO test_empty_data FORMAT Parquet" && ${CLICKHOUSE_CLIENT} --query="SELECT 1 AS x LIMIT 0 FORMAT Parquet") | ${CLICKHOUSE_CLIENT}
|
|
|
|
${CLICKHOUSE_CLIENT} --query="SELECT count() FROM test_empty_data"
|
2020-12-04 02:15:44 +00:00
|
|
|
|
|
|
|
${CLICKHOUSE_CLIENT} -q "DROP TABLE test_empty_data"
|