-
Notifications
You must be signed in to change notification settings - Fork 368
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
Bounds error when sorting a column after select
#3340
Comments
Thank you for reporting. This is unrelated to DataFrames.jl. The fundamental problem is:
This is triggered in SortingAlgorithms.jl / Base. @LilithHafner - maybe there were some recent changes to these algorithms? The column sorted is |
@George9000, thank you for reporting, and @bkamins, thank you for @ ing me. I can confirm that this is my fault. I introduced a fast path for sorting unions with missing that is only safe when sorting an entire vector (a la I will fix the restrict the dispatch to the fastpath in Base's sorting to unbreak this internal method. This fix should make it into 1.9.2 and 1.10.0. I will also patch SortingAlgorithms so that TimSort calls a public method (which I did not break). That will come out soon. |
@LilithHafner - thank you for a prompt response. You are a top expert in this field and your expertise is highly appreciated here. Could you please x-link this issue to the PR you would make (so that I can close this issue when things are sorted out 😄 ). |
I'm assuming you are referring to the field of "fixing bugs that Lilith introduced" 😄 Happy to help. |
I really appreciate your efforts to improve sorting in Julia! |
@George9000, would you please run |
Works for me. Is JuliaLang/julia#50171 needed to fix the issue (or it is just another enhancement, but DataFrames.jl is already fixed without it?) |
…the use of TimSort
These are Base.Sort bugs so JuliaLang/julia#50171 is the real fix. JuliaCollections/SortingAlgorithms.jl#78 is a temporary shim so that SortingAlgorithms (and DataFrames by extension) is not broken before JuliaLang/julia#50171 is released. |
Ah - OK. Now I see it. Still - this issue can be closed then. Right? |
Late to the game here. Now works with Julia 1.9.1. Thank you. Still fails with 1.10.0-DEV built from source a few days ago, but will wait for julia#50171 to merge, rebuild, and try again. julia 1.10 error
|
Should work on Julia master too as of a few days ago |
Yes, it works. Thank you! |
Using Julia 1.9.1 and DataFrames 1.5.0, a bounds error is thrown when attempting to sort a dataframe by a column following a
select
and reassignment operation. This is not reproducible in another column in the same dataframe. Despite scrutinizing the contents of the column throwing the error, no clues to source are found.[version details in expandable section below code]
Example data to reproduce error is here.
version info, project.toml, error output
The text was updated successfully, but these errors were encountered: