andygrove commented on code in PR #636:
URL: https://github.com/apache/datafusion-comet/pull/636#discussion_r1667181686
##########
core/src/execution/datafusion/spark_hash.rs:
##########
@@ -89,10 +89,7 @@ pub(crate) fn spark_compatible_murmur3_hash<T:
AsRef<[u8]>>(data: T, seed: u32)
// data is &[u8] so we do not need to check for proper alignment
unsafe {
let mut h1 = if len_aligned > 0 {
- hash_bytes_by_int(
- std::slice::from_raw_parts(data.get_unchecked(0), len_aligned),
- seed,
- )
+ hash_bytes_by_int(&data[0..len_aligned], seed)
Review Comment:
This fixes a miri warning. I ran the murmur3 bench before and after this
change and did not see a significant difference.
--
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]