Added a test for empty external data

This commit is contained in:
Alexey Milovidov 2020-05-14 20:36:59 +03:00
parent 519e6ce6f3
commit 273267ca8b
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,3 @@
0
0
1

View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. $CURDIR/../shell_config.sh
set -e
touch ${CLICKHOUSE_TMP}/empty.tsv
clickhouse-client --query="SELECT count() FROM data" --external --file=${CLICKHOUSE_TMP}/empty.tsv --name=data --types=UInt32
rm ${CLICKHOUSE_TMP}/empty.tsv
echo -n | clickhouse-client --query="SELECT count() FROM data" --external --file=- --name=data --types=UInt32
echo | clickhouse-client --query="SELECT count() FROM data" --external --file=- --name=data --types=String