You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Dandandan (via GitHub)" <gi...@apache.org> on 2025/04/18 16:29:35 UTC
Re: [PR] [MINOR] Improve performance of interleave_primitive (-15% - 45%) / interleave_bytes (-10-25%) [arrow-rs]
Dandandan commented on code in PR #7420:
URL: https://github.com/apache/arrow-rs/pull/7420#discussion_r2050842953
##########
arrow-select/src/interleave.rs:
##########
@@ -132,12 +132,11 @@ impl<'a, T: Array + 'static> Interleave<'a, T> {
let nulls = match has_nulls {
true => {
- let mut builder = NullBufferBuilder::new(indices.len());
- for (a, b) in indices {
- let v = arrays[*a].is_valid(*b);
- builder.append(v)
- }
- builder.finish()
+ let nulls = BooleanBuffer::collect_bool(indices.len(), |i| {
Review Comment:
This is a pattern that comes up often as well
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org