mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Add a test for PrettyCompactMonoBlock via clickhouse-local
This commit is contained in:
parent
4c08fff0d3
commit
3aba406f47
@ -0,0 +1,32 @@
|
|||||||
|
one block
|
||||||
|
┌─[1mnumber[0m─┐
|
||||||
|
│ 0 │
|
||||||
|
│ 1 │
|
||||||
|
└────────┘
|
||||||
|
two blocks
|
||||||
|
┌─[1mnumber[0m─┐
|
||||||
|
│ 0 │
|
||||||
|
│ 0 │
|
||||||
|
└────────┘
|
||||||
|
extremes
|
||||||
|
┌─[1mnumber[0m─┐
|
||||||
|
│ 0 │
|
||||||
|
│ 1 │
|
||||||
|
│ 2 │
|
||||||
|
└────────┘
|
||||||
|
|
||||||
|
Extremes:
|
||||||
|
┌─[1mnumber[0m─┐
|
||||||
|
│ 0 │
|
||||||
|
│ 2 │
|
||||||
|
└────────┘
|
||||||
|
totals
|
||||||
|
┌─[1msum(number)[0m─┐
|
||||||
|
│ 2 │
|
||||||
|
│ 1 │
|
||||||
|
└─────────────┘
|
||||||
|
|
||||||
|
Totals:
|
||||||
|
┌─[1msum(number)[0m─┐
|
||||||
|
│ 3 │
|
||||||
|
└─────────────┘
|
13
tests/queries/0_stateless/00405_PrettyCompactMonoBlock.sh
Executable file
13
tests/queries/0_stateless/00405_PrettyCompactMonoBlock.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user