-
Notifications
You must be signed in to change notification settings - Fork 11
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
Changing order and group #51
Comments
This change changes the recommend way of ordering the order clause Instead of order .baz asc default=1 use order .baz default=1 asc This makes the language more uniform. Paths with default values in return values have the same shape (as they don't have an additional asc/desc keyword). This is related to pipedown#51.
The different order in the order clause is already support (both ways work), so it's just a matter of changing the documentation (which is done with #54). For the grouping part, I wasn't aware that default values also work for other aggregates like
Here the new syntax |
This change changes the recommend way of ordering the order clause Instead of order .baz asc default=1 use order .baz default=1 asc This makes the language more uniform. Paths with default values in return values have the same shape (as they don't have an additional asc/desc keyword). This is related to #51.
Prior to this change, default values for aggregates were specified as: max(.foo) default=5 The new syntax is putting the default value within the aggregate function: max(.foo default=5) This makes more sense as the default value is not a single value for the `max()` function, but it is applied to every Keypath *within* the `max()` function. It is also more symmetrical to the default values for returns. There it's also <Keypath> <space> <default>, e.g.: return .foo default=5 This is part of pipedown#51.
I'd like to propose changing the language a bit to make it a bit more regular/consistent.
Order clause
Currently it is is:
I'd like to change it to:
Reason: In return values it's:
So it's (kind of like a tuple). Use this pattern for the order as well.
Grouping
Currently
group()
is:I'd like to change it to:
Reason: It now has the same shape as the order clause.
What do others think about making this change?
The text was updated successfully, but these errors were encountered: