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

Support sorting of Vector{Union{T, Missing}} for RadixSort #34

Closed
xiaodaigh opened this issue Dec 1, 2019 · 2 comments · Fixed by #63
Closed

Support sorting of Vector{Union{T, Missing}} for RadixSort #34

xiaodaigh opened this issue Dec 1, 2019 · 2 comments · Fixed by #63

Comments

@xiaodaigh
Copy link

I think this can be done by adding and making some other accommodating changes

uint_mapping(Forward, missing) = 2^8sizeof(UInt)-1
uint_mapping(Reverse, missing) = UInt(0)

This is the approach taken in SortingLab.jl to support sorting of Vector{Union{Missing, T}} for radix-sort.

@nalimilan
Copy link
Contributor

Interesting. Could you make a PR? Probably also worth supporting nothing.

@xiaodaigh
Copy link
Author

BTW

sort([nothing, 2,3])

returns an error on Julia 1.3. So should not support nothing in solidarity

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