zhuqi-lucas commented on code in PR #7962: URL: https://github.com/apache/arrow-rs/pull/7962#discussion_r2217158575
########## arrow-ord/src/sort.rs: ########## @@ -4709,4 +4731,77 @@ mod tests { assert_eq!(&sorted[0], &expected_struct_array); } + + /// A simple, correct but slower reference implementation. + fn naive_partition(array: &BooleanArray) -> (Vec<u32>, Vec<u32>) { + let len = array.len(); + let mut valid = Vec::with_capacity(len); + let mut nulls = Vec::with_capacity(len); + for i in 0..len { + if array.is_valid(i) { + valid.push(i as u32); + } else { + nulls.push(i as u32); + } + } + (valid, nulls) + } + + #[test] + fn fuzz_partition_validity() { Review Comment: These tests compare to make sure our partition null logic is same as before. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org