adriangb commented on code in PR #18718:
URL: https://github.com/apache/datafusion/pull/18718#discussion_r2529136073
##########
datafusion/common/src/hash_utils.rs:
##########
@@ -329,6 +329,40 @@ where
Ok(())
}
+#[cfg(not(feature = "force_hash_collisions"))]
+fn hash_union_array(
+ array: &UnionArray,
+ random_state: &RandomState,
+ hashes_buffer: &mut [u64],
+) -> Result<()> {
+ let DataType::Union(union_fields, _mode) = array.data_type() else {
+ unreachable!()
+ };
+
+ let mut child_hashes = vec![None; 128];
Review Comment:
is 128 the max? I feel like just using a HashMap and then doing a get()
below instead would be more readable and the same performance (maybe unless we
128 single item arrays or something...)
--
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]