Dandandan commented on a change in pull request #9116:
URL: https://github.com/apache/arrow/pull/9116#discussion_r554613451
##########
File path: rust/datafusion/src/physical_plan/hash_join.rs
##########
@@ -907,4 +1068,53 @@ mod tests {
Ok(())
}
+
+ #[test]
+ fn join_with_hash_collision() -> Result<()> {
+ let mut hashmap_left = HashMap::with_hasher(IdHashBuilder {});
+ let left = build_table_i32(
+ ("a", &vec![10, 20]),
+ ("x", &vec![100, 200]),
+ ("y", &vec![200, 300]),
+ );
+
+ let random_state = RandomState::new();
+
+ let hashes = create_hashes(&[left.columns()[0].clone()],
&random_state)?;
+
+ // Create hash collisions
+ hashmap_left.insert(hashes[0], vec![0, 1]);
Review comment:
Maps to both indices, the test makes sure the extra "collisions" are
removed.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]