Skip to content

Improved the display of tuples in Pretty format, #65388#76184

Open
krutik2966 wants to merge 4 commits intoClickHouse:masterfrom
krutik2966:issue-65388
Open

Improved the display of tuples in Pretty format, #65388#76184
krutik2966 wants to merge 4 commits intoClickHouse:masterfrom
krutik2966:issue-65388

Conversation

@krutik2966
Copy link
Copy Markdown

@krutik2966 krutik2966 commented Feb 14, 2025

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Improved the display of tuples in Pretty format to show elements as subcolumns, preserving the hierarchy in the header for better readability. Closes #65388.

Documentation entry for user-facing changes

Motivation: The new output format for tuples in Pretty formats improves the readability of query results by displaying tuple elements as subcolumns with clear headers, making it easier for users to interpret complex nested structures.

Example usage :

SELECT 'hello' AS x, (1 AS a, 'world' AS b) AS t

                  ┌─x─────┬─t───────────┐
Previous result : │ hello │ (1,'world') │
                  └───────┴─────────────┘

      ┌─x─────┬─t─────────┐
      ├───────┼─a─┬─b─────┤
Now : │ hello │ 1 │ world │
      └───────┴───┴───────┘

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Feb 14, 2025

CLA assistant check
All committers have signed the CLA.

@krutik2966 krutik2966 force-pushed the issue-65388 branch 2 times, most recently from de002a7 to b9eb084 Compare February 14, 2025 22:32
@alexey-milovidov alexey-milovidov changed the title Issue 65388 Improved the display of tuples in Pretty format, #65388 Feb 15, 2025
@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label Feb 15, 2025
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Feb 15, 2025

Workflow [PR], commit [2fd620f]

@clickhouse-gh clickhouse-gh bot added the pr-improvement Pull request with some product improvements label Feb 15, 2025
│ check_system_tables │ name2 │ name1 │ name1 │ name1 │ default │ 0 │
└─────────────────────┴───────────────┴─────────────┴─────────────┴──────────────┴────────────────┴────────────┘
┌─name──┬─is_in_partition_key─┬─is_in_sorting_key─┬─is_in_primary_key─┬─is_in_sampling_key─┐
├───────┼─────────────────────┼───────────────────┼───────────────────┼────────────────────┤
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This result does not have tuples, but still has changed. This does not look right.

┏━━━━━━━━━━━━━━━━━━━━━━┓
┃ CAST('true', 'Bool') ┃
┣━━━━━━━━━━━━━━━━━━━━━━┫
┃ ┃
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This empty space is not what we needed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review! I will make the necessary changes.

@alexey-milovidov alexey-milovidov removed the can be tested Allows running workflows for external contributors label Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-improvement Pull request with some product improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tuples in Pretty and Vertical formats should be displayed naturally as subcolumns.

3 participants