-
Notifications
You must be signed in to change notification settings - Fork 125
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
Normalize sorting options #771
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful work. The only suggestion I have is about the defaults.
Numpy and Pandas do not use stable sorting by default nor Polars. Polars is also parallel by default, which I believe we should try to be as well. So my suggestion is to make stable default to false and parallel default to true. This way, we can also simplify the explanation of parallel. We could say "Use parallel algorithms when possible. Set it to false to disable it.".
Thoughts?
@josevalim That sounds great. I was keeping the defaults we had, but I hadn't thought about what they ought to be. I can definitely have
That's a good tactic: describe the philosophy instead of belaboring the implementation (which may change). I think I'll still add a sentence about parallelism not always being available on lazy operations. That way the reader will have some idea of what we mean by "when possible". |
also simplify the wording on the parallel option
Closes:
Each of these options are now available on all the sorting functions:
direction: :asc | :desc
nils: :first | :last
parallel: true | false
stable: true | false