Add a test for PrettyCompactMonoBlock via clickhouse-local

This commit is contained in:
Azat Khuzhin 2020-08-06 01:43:23 +03:00
parent 4c08fff0d3
commit 3aba406f47
2 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,32 @@
one block
┌─number─┐
│ 0 │
│ 1 │
└────────┘
two blocks
┌─number─┐
│ 0 │
│ 0 │
└────────┘
extremes
┌─number─┐
│ 0 │
│ 1 │
│ 2 │
└────────┘
Extremes:
┌─number─┐
│ 0 │
│ 2 │
└────────┘
totals
┌─sum(number)─┐
│ 2 │
│ 1 │
└─────────────┘
Totals:
┌─sum(number)─┐
│ 3 │
└─────────────┘

View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. "$CURDIR"/../shell_config.sh
echo 'one block'
${CLICKHOUSE_LOCAL} --query="SELECT * FROM numbers(2)" --format PrettyCompactMonoBlock
echo 'two blocks'
${CLICKHOUSE_LOCAL} --query="SELECT * FROM numbers(1) UNION ALL SELECT * FROM numbers(1)" --format PrettyCompactMonoBlock
echo 'extremes'
${CLICKHOUSE_LOCAL} --query="SELECT * FROM numbers(3)" --format PrettyCompactMonoBlock --extremes=1
echo 'totals'
${CLICKHOUSE_LOCAL} --query="SELECT sum(number) FROM numbers(3) GROUP BY number%2 WITH TOTALS" --format PrettyCompactMonoBlock