Skip to content

Commit 2fcd4cd

Browse files
Merge pull request ClickHouse#79396 from ClickHouse/no-glue-totals
Do not glue totals and extremes in Pretty formats
2 parents 5383da6 + 744fdb8 commit 2fcd4cd

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

src/Processors/Formats/Impl/PrettyBlockOutputFormat.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,7 @@ void PrettyBlockOutputFormat::writeChunk(const Chunk & chunk, PortKind port_kind
459459
};
460460

461461
if (glue_chunks
462+
&& port_kind == PortKind::Main
462463
&& (!format_settings.pretty.row_numbers || row_number_width == prev_row_number_width)
463464
&& name_widths == prev_chunk_name_widths)
464465
{
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
┌─number─┬─count()─┐
2+
1. │ 0 │ 1 │
3+
2. │ 1 │ 1 │
4+
3. │ 2 │ 1 │
5+
4. │ 3 │ 1 │
6+
5. │ 4 │ 1 │
7+
└────────┴─────────┘
8+
9+
Totals:
10+
┌─number─┬─count()─┐
11+
1. │ 0 │ 5 │
12+
└────────┴─────────┘
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
SET output_format_pretty_row_numbers = 1;
2+
SET output_format_pretty_glue_chunks = 1;
3+
SET output_format_pretty_squash_consecutive_ms = 0;
4+
5+
SELECT number, count() FROM numbers(5) GROUP BY number WITH TOTALS ORDER BY number FORMAT PrettyCompact;

0 commit comments

Comments
 (0)