jhorstmann commented on code in PR #7984: URL: https://github.com/apache/arrow-rs/pull/7984#discussion_r2227776952
########## arrow-array/src/builder/primitive_builder.rs: ########## @@ -296,7 +297,7 @@ impl<T: ArrowPrimitiveType> PrimitiveBuilder<T> { .expect("append_trusted_len_iter requires an upper bound"); self.null_buffer_builder.append_n_non_nulls(len); - self.values_builder.append_trusted_len_iter(iter); + self.values_builder.extend(iter); Review Comment: If the `iter` actually implements the stdlib internal [`TrustedLen`](https://doc.rust-lang.org/std/iter/trait.TrustedLen.html) trait then this should get nicely optimized. The only caller inside the codebase seems to be in `arrow-select` with a Range iterator, which implements that trait. -- 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