-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Shell: Provide a summary of numbers if we are rendering only a single row #15031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Love it! |
|
I love both of you, but ... I don't get it, I don't like (at all) the fact that this is not composable / special cased. Apart from taste, I think one connected feedback is that it would be cool to have a way to persist this setting across sessions directly FROM the cli. Either a modifier on a given command, say Then it becomes simpler to add stuff, while making it easy for people to remember setting. |
|
It's a contextual rendering that provides an easier way to see what a result means. The point of I guess we could optionally enable it for multiple rows (which is what I assume you mean with "it is not composable"?) - but that gets very busy very quickly since it doubles the rendering size of the result set. I think the single-row is a good compromise, since single-row queries are very common (especially for |
|
Maybe a good compromise is to leave it out by default when |
|
Thanks for the deeper explanation! I sounded more certain than I am, and it's right that duckbox is not used by tools (that can do |
|
Thinking about this a bit more, maybe it would be nice to offer this at three levels:
|
…r piping to file we skip the footer
Shell: Provide a summary of numbers if we are rendering only a single row (duckdb/duckdb#15031)
Shell: Provide a summary of numbers if we are rendering only a single row (duckdb/duckdb#15031)
Shell: Provide a summary of numbers if we are rendering only a single row (duckdb/duckdb#15031)
Shell: Provide a summary of numbers if we are rendering only a single row (duckdb/duckdb#15031)
Shell: Provide a summary of numbers if we are rendering only a single row (duckdb/duckdb#15031) Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
Many result sets contain only a single row (or single value), for example, when running
SELECT COUNT(*) FROM tblor similar summaries. In those cases, we often receive a single (often big) number. This PR adds support for a human readable rendering of these numbers, e.g.:This option can be disabled using
.large_number_rendering off:In addition, this can be applied to all numeric values using
.large_number_rendering all