mbutrovich commented on code in PR #12228:
URL: https://github.com/apache/arrow-rs/pull/12228#discussion_r4589503427


##########
arrow-array/src/builder/primitive_builder.rs:
##########
@@ -350,31 +349,16 @@ impl<T: ArrowPrimitiveType> PrimitiveBuilder<T> {
 
     /// Builds the [`PrimitiveArray`] and reset this builder.
     pub fn finish(&mut self) -> PrimitiveArray<T> {
-        let len = self.len();
         let nulls = self.null_buffer_builder.finish();

Review Comment:
   > `NullBufferBuilder::finish` should return `None` here itself, which is 
#12238. Once that's fixed, these filters can go.
   
   #12251 fixed #12238 on `main`. `NullBufferBuilder::finish` and 
`finish_cloned` now drop a null buffer with no nulls 
([null.rs](https://github.com/apache/arrow-rs/blob/d65329d3e71f4276ce41c8675446d178cecfc1fa/arrow-buffer/src/builder/null.rs#L238-L261)).
 Could you rebase onto `main` and remove the eight `.filter(|n| n.null_count() 
> 0)` calls? The `test_finish_materialized_without_nulls` tests should stay, 
because they check what each builder returns.



-- 
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]

Reply via email to