jhorstmann opened a new issue #953: URL: https://github.com/apache/arrow-rs/issues/953
**Describe the bug** When sorting with a limit that is lower than the number of null, the sorting code calculates an incorrect length (`len.saturating_sub(nulls_len)`, which results in 0), the `partial_sort` function then still partitions the data but does not fully sort it. Instead the formula should take the minimum of the length of valid indices and the given limit. **To Reproduce** Sort an array that contains many nulls. A minimal testcase is not that easy to create since the partion/select_nth_unstable_by step still does a partal sort. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
