clickhouse-playground icon indicating copy to clipboard operation
clickhouse-playground copied to clipboard

PrettyCompactMonoBlock by default

Open den-crane opened this issue 1 year ago • 3 comments

it looks much nicer if enabled SET output_format_pretty_grid_charset = 'ASCII', output_format_pretty_color=0;

https://fiddle.clickhouse.com/fd308ccc-94d8-4f7a-b1e5-6fd1ddbe8b18

den-crane avatar Apr 15 '23 21:04 den-crane

Looks reasonable for me. If I understand correctly, it can be set in the users.xml default profile config. I will try that in the nearly future, thanks for idea!

lodthe avatar Apr 16 '23 21:04 lodthe

all these settings are available at a client side.

clickhouse-client --format=PrettyCompactMonoBlock --output_format_pretty_grid_charset=ASCII --output_format_pretty_color=0 -q "select 1"
+-1-+
| 1 |
+---+

curl 'http://localhost:8123/?default_format=PrettyCompactMonoBlock&output_format_pretty_grid_charset=ASCII&output_format_pretty_color=0&query=select+1'
+-1-+
| 1 |
+---+

den-crane avatar Apr 17 '23 13:04 den-crane

The feature had been supported, but then I changed my mind: some people are OK with PrettyCompactMonoBlock, and others are not.

A user should be able to change the default format for their runs. I see it as a module window in which settings can be chosen, and the choice is synced with the browser's local storage.

Before such a user-side configuration is provided, IMO it's better to not overwhelm output with extra characters. The feature has been rolled back. Your idea will be supported as a part of the settings module window.

lodthe avatar Apr 19 '23 00:04 lodthe