2021-08-03 13:41:58 +00:00
#!/usr/bin/env bash
2021-08-03 12:31:38 +00:00
CURDIR = $( cd " $( dirname " ${ BASH_SOURCE [0] } " ) " && pwd )
# shellcheck source=../shell_config.sh
. " $CURDIR " /../shell_config.sh
2021-08-04 09:53:41 +00:00
set -e
[ -e " ${ CLICKHOUSE_TMP } " /test_compression_of_output_file_from_client.gz ] && rm " ${ CLICKHOUSE_TMP } " /test_compression_of_output_file_from_client.gz
2021-08-03 12:31:38 +00:00
${ CLICKHOUSE_CLIENT } --query " SELECT * FROM (SELECT 'Hello, World! From client.') INTO OUTFILE ' ${ CLICKHOUSE_TMP } /test_compression_of_output_file_from_client.gz' "
gunzip ${ CLICKHOUSE_TMP } /test_compression_of_output_file_from_client.gz
cat ${ CLICKHOUSE_TMP } /test_compression_of_output_file_from_client
2021-08-04 09:53:41 +00:00
rm -f " ${ CLICKHOUSE_TMP } /test_compression_of_output_file_from_client "
[ -e " ${ CLICKHOUSE_TMP } " /test_compression_of_output_file_from_local.gz ] && rm " ${ CLICKHOUSE_TMP } " /test_compression_of_output_file_from_local.gz
2021-08-03 12:31:38 +00:00
${ CLICKHOUSE_LOCAL } --query " SELECT * FROM (SELECT 'Hello, World! From local.') INTO OUTFILE ' ${ CLICKHOUSE_TMP } /test_compression_of_output_file_from_local.gz' "
gunzip ${ CLICKHOUSE_TMP } /test_compression_of_output_file_from_local.gz
2021-08-03 12:52:46 +00:00
cat ${ CLICKHOUSE_TMP } /test_compression_of_output_file_from_local
2021-08-04 09:53:41 +00:00
rm -f " ${ CLICKHOUSE_TMP } /test_compression_of_output_file_from_local "