mbutrovich commented on code in PR #3659:
URL: https://github.com/apache/datafusion-comet/pull/3659#discussion_r3267400312
##########
native/shuffle/src/spark_unsafe/list.rs:
##########
@@ -195,36 +198,31 @@ impl SparkUnsafeArray {
return;
}
- let mut ptr = self.element_offset as *const u8;
+ // SAFETY: element_offset points to contiguous u8 data of length
num_elements.
debug_assert!(
- !ptr.is_null(),
+ self.element_offset != 0,
"append_booleans: element_offset pointer is null"
);
+ let values =
Review Comment:
Booleans have alignment 1, so there is no alignment fallback to worry about.
The `for &val in values` form in the non-nullable branch reads really well.
Same question as above applies to the nullable boolean branch: it still loops
with a per-element null check, which `BooleanBuilder` may be able to absorb in
bulk.
--
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]