rluvaton commented on code in PR #24606:
URL: https://github.com/apache/datafusion/pull/24606#discussion_r3851461816
##########
datafusion/physical-plan/src/aggregates/group_values/null_builder.rs:
##########
@@ -93,23 +65,7 @@ impl MaybeNullBufferBuilder {
///
/// This is guaranteed to be true if there are nulls
/// but may be true even if there are no nulls
- pub(crate) fn might_have_nulls(&self) -> bool {
- self.nulls.as_slice().is_some()
- }
-}
-
-#[cfg(test)]
-mod tests {
- use super::*;
- use arrow::array::BooleanBufferBuilder;
-
- #[test]
- fn allocated_size_should_return_bytes() {
- let mut expected = BooleanBufferBuilder::new(0);
- expected.append(true);
- let expected_capacity_in_bytes = expected.capacity() / 8;
- let mut builder = MaybeNullBufferBuilder::new();
- builder.append(true);
- assert_eq!(builder.allocated_size(), expected_capacity_in_bytes);
+ fn might_have_nulls(&self) -> bool {
+ self.as_slice().is_some()
}
Review Comment:
This is the responsibility of arrow `NullBufferBuilder` and not here
--
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]