Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions datafusion/common/src/hash_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,7 @@ fn hash_string_view_array_inner<
// all views are inlined, no need to access external buffers
if !HAS_BUFFERS || view_len <= 12 {
if REHASH {
let mut hasher = seeded_state(*hash).build_hasher();
v.hash_write(&mut hasher);
*hash = hasher.finish();
*hash = combine_hashes(v.hash_one(random_state), *hash);
} else {
*hash = v.hash_one(random_state);
}
Expand All @@ -356,9 +354,7 @@ fn hash_string_view_array_inner<
// view is not inlined, so we need to hash the bytes as well
let value = view_bytes(view_len, v);
if REHASH {
let mut hasher = seeded_state(*hash).build_hasher();
value.hash_write(&mut hasher);
*hash = hasher.finish();
*hash = combine_hashes(value.hash_one(random_state), *hash);
} else {
*hash = value.hash_one(random_state);
}
Expand Down Expand Up @@ -390,9 +386,7 @@ fn hash_generic_byte_view_array<T: ByteViewType>(
}
(false, false, true) => {
for (hash, &view) in hashes_buffer.iter_mut().zip(array.views().iter()) {
let mut hasher = seeded_state(*hash).build_hasher();
view.hash_write(&mut hasher);
*hash = hasher.finish();
*hash = combine_hashes(view.hash_one(random_state), *hash);
}
}
(false, true, false) => hash_string_view_array_inner::<T, false, true, false>(
Expand Down
Loading