Skip to content
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

Add summarize docs for "by" without an aggregate function #5216

Merged
merged 2 commits into from
Aug 16, 2024
Merged

Conversation

philrz
Copy link
Contributor

@philrz philrz commented Aug 12, 2024

A recent community Slack thread made me realize we were lacking usage docs and an example for by in the absence of an aggregate function.

While I was making this change, I saw that the existing by coverage didn't seem to show that multiple keys could be specified, so I've tried to address that as well.

Comment on lines +8 to +12
[summarize] [<field>:=]<agg>
[summarize] [<field>:=]<agg> [where <expr>][, [<field>:=]<agg> [where <expr>] ...]
[summarize] [<field>:=]<agg> [by [<field>][:=<expr>][, [<field>][:=<expr>]] ...]
[summarize] [<field>:=]<agg> [where <expr>][, [<field>:=]<agg> [where <expr>] ...] [by [<field>][:=<expr>][, [<field>][:=<expr>]] ...]
[summarize] by [<field>][:=<expr>][, [<field>][:=<expr>] ...]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

After seeing the first iteration of this PR, @nwt correctly pointed out that the expanded/corrected original synopsis line was way too long and complex. His first thought on how to improve it was to break it out into more lines, so that's what I've done on this next iteration and indeed I'm liking it more. I like leading with the shorter one that represents a very common use, then builds up to the full/beastly one, so if a user is learning incrementally hopefully they'll get the idea.

@philrz philrz merged commit 8e888f4 into main Aug 16, 2024
4 checks passed
@philrz philrz deleted the doc-by-alone branch August 16, 2024 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants