v.25.5Improvement

If data in the pretty format is

If data in the pretty format is displayed in the terminal, and a subsequent block has the same column widths, it can continue from the previous block, glue it to the previous block by moving the cursor up. This closes #79333. The feature is controlled by the new setting, output_format_pretty_glue_chunks. #79339 (Alexey Milovidov).
Introduces the ability to glue consecutive output blocks in pretty format by reusing column widths, improving the terminal display continuity.

Why it matters

This feature solves the problem of disjointed output when displaying query results in the terminal using pretty format. By aligning blocks with the same column widths and moving the cursor appropriately, it creates a seamless, continuous display that is easier to read and visually coherent.

How to use it

Enable the feature by setting the new setting output_format_pretty_glue_chunks to 1 before running your query. When active, if consecutive output blocks have the same column widths, ClickHouse will merge them by adjusting the cursor position in the terminal.