alamb commented on code in PR #20077:
URL: https://github.com/apache/datafusion/pull/20077#discussion_r2747015793


##########
datafusion/physical-expr-common/src/binary_view_map.rs:
##########
@@ -437,7 +437,7 @@ where
         let views_size = self.views.len() * size_of::<u128>();
         let in_progress_size = self.in_progress.capacity();
         let completed_size: usize = self.completed.iter().map(|b| 
b.len()).sum();
-        let nulls_size = self.nulls.len() / 8;
+        let nulls_size = self.nulls.allocated_size() / 8;

Review Comment:
   Allocated size is in bytes (not bits) 
https://docs.rs/arrow/latest/arrow/array/struct.NullBufferBuilder.html#method.allocated_size
   
   > Return the allocated size of this builder, in bytes, useful for memory 
accounting.
   
   
   
   So I don't think we should still be dividing by 8



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to