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

Problems in @orderby #337

Closed
bkamins opened this issue Oct 3, 2022 · 2 comments · Fixed by #338
Closed

Problems in @orderby #337

bkamins opened this issue Oct 3, 2022 · 2 comments · Fixed by #338

Comments

@bkamins
Copy link
Member

bkamins commented Oct 3, 2022

@pdeffebach
Following https://discourse.julialang.org/t/how-does-orderby-work-with-multiple-columns/88155/2 investigation I found two problems with @orderby:

  1. the docstring recommends using sortperm, but I do not understand your logic behind this, I think you meant ordinalrank (or some other rank) from StatsBase.jl - it is probably confusing readers
  2. internally you use sortperm(t) in the implementation; this behavior is deprecated; you should do sortperm(t, :) in the future; the reason for this deprecation is that sortperm(t) definition was inconsistent (starting from DataFrames.jl 1.4 it will start producing warnings); the same is for all sorting methods getting only a data frame as a source (a general recommendation: run all DataFramesMeta.jl tests with deprecation warnings enabled and see where warning is thrown)

Thank you!

@pdeffebach
Copy link
Collaborator

Yes, sorry. Both these are correct. I thought the sortperm issue was fixed, but it was not. I will fix this.

@bkamins
Copy link
Member Author

bkamins commented Oct 3, 2022

internally you use sortperm(t) in the implementation; this behavior is deprecated;

Sorry - I have re-checked it. The code is OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants