jayzhan211 commented on code in PR #8552:
URL: https://github.com/apache/arrow-datafusion/pull/8552#discussion_r1430758472
##########
datafusion/common/src/hash_utils.rs:
##########
@@ -207,6 +208,32 @@ fn hash_dictionary<K: ArrowDictionaryKeyType>(
Ok(())
}
+fn hash_struct_array(
+ array: &StructArray,
+ random_state: &RandomState,
+ hashes_buffer: &mut [u64],
+) -> Result<()> {
+ let nulls = array.nulls();
+ let num_columns = array.num_columns();
+
+ // Skip null columns
+ let valid_indices: Vec<usize> = if let Some(nulls) = nulls {
+ nulls.valid_indices().collect()
+ } else {
+ (0..num_columns).collect()
Review Comment:
I hash each row now, so we iterate the valid row and hash each column at
that row to one hash value.
--
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]