This is an automated email from the ASF dual-hosted git repository. tustvold pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/master by this push: new 02c695fed Remove BitSliceIterator specialization from try_for_each_valid_idx (#3621) 02c695fed is described below commit 02c695fed9e62dc9a3feb47372eed01e983e4c44 Author: Raphael Taylor-Davies <1781103+tustv...@users.noreply.github.com> AuthorDate: Sun Jan 29 18:38:54 2023 +0000 Remove BitSliceIterator specialization from try_for_each_valid_idx (#3621) --- arrow-data/src/bit_iterator.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/arrow-data/src/bit_iterator.rs b/arrow-data/src/bit_iterator.rs index 45a42c391..ea95f1f38 100644 --- a/arrow-data/src/bit_iterator.rs +++ b/arrow-data/src/bit_iterator.rs @@ -186,14 +186,7 @@ pub fn try_for_each_valid_idx<E, F: FnMut(usize) -> Result<(), E>>( if valid_count == len { (0..len).try_for_each(f) } else if null_count != len { - let selectivity = valid_count as f64 / len as f64; - if selectivity > 0.8 { - BitSliceIterator::new(nulls.unwrap(), offset, len) - .flat_map(|(start, end)| start..end) - .try_for_each(f) - } else { - BitIndexIterator::new(nulls.unwrap(), offset, len).try_for_each(f) - } + BitIndexIterator::new(nulls.unwrap(), offset, len).try_for_each(f) } else { Ok(()) }