alamb commented on code in PR #11467:
URL: https://github.com/apache/datafusion/pull/11467#discussion_r1683359036
##########
datafusion/physical-plan/src/joins/hash_join.rs:
##########
@@ -1930,6 +1931,8 @@ mod tests {
Ok(())
}
+ // FIXME(#TODO) test fails with feature `force_hash_collisions`
Review Comment:
I was writing up a ticket and testing locally. When I removed the cfgs
```diff
diff --git a/datafusion/physical-plan/src/joins/hash_join.rs
b/datafusion/physical-plan/src/joins/hash_join.rs
index fdf062b1f..359a86856 100644
--- a/datafusion/physical-plan/src/joins/hash_join.rs
+++ b/datafusion/physical-plan/src/joins/hash_join.rs
@@ -1583,7 +1583,7 @@ mod tests {
use rstest::*;
use rstest_reuse::*;
- #[cfg(not(feature = "force_hash_collisions"))]
+
fn div_ceil(a: usize, b: usize) -> usize {
(a + b - 1) / b
}
@@ -1932,7 +1932,6 @@ mod tests {
}
// FIXME(#TODO) test fails with feature `force_hash_collisions`
- #[cfg(not(feature = "force_hash_collisions"))]
#[apply(batch_sizes)]
#[tokio::test]
async fn join_inner_two(batch_size: usize) -> Result<()> {
@@ -1989,7 +1988,6 @@ mod tests {
/// Test where the left has 2 parts, the right with 1 part => 1 part
// FIXME(#TODO) test fails with feature `force_hash_collisions`
- #[cfg(not(feature = "force_hash_collisions"))]
#[apply(batch_sizes)]
#[tokio::test]
async fn join_inner_one_two_parts_left(batch_size: usize) -> Result<()>
{
@@ -2103,7 +2101,6 @@ mod tests {
/// Test where the left has 1 part, the right has 2 parts => 2 parts
// FIXME(#TODO) test fails with feature `force_hash_collisions`
- #[cfg(not(feature = "force_hash_collisions"))]
#[apply(batch_sizes)]
#[tokio::test]
async fn join_inner_one_two_parts_right(batch_size: usize) ->
Result<()> {
```
And then ran the tests they seemed to pass for me locally:
```shell
andrewlamb@Andrews-MacBook-Pro-2:~/Software/datafusion$ cargo test --lib
--features=force_hash_collisions -p datafusion-physical-plan -- join_inner
warning: /Users/andrewlamb/Software/datafusion/Cargo.toml: unused manifest
key: workspace.lints.rust.unexpected_cfgs.check-cfg
Compiling datafusion-physical-plan v40.0.0
(/Users/andrewlamb/Software/datafusion/datafusion/physical-plan)
Finished `test` profile [unoptimized + debuginfo] target(s) in 3.59s
Running unittests src/lib.rs
(target/debug/deps/datafusion_physical_plan-8b4d4245d6c07ebc)
running 40 tests
test joins::hash_join::tests::join_inner_one_no_shared_column_names ... ok
test joins::hash_join::tests::join_inner_one::batch_size_3_5 ... ok
test joins::hash_join::tests::join_inner_one_two_parts_left::batch_size_4_2
... ok
test joins::hash_join::tests::join_inner_one::batch_size_2_10 ... ok
test joins::hash_join::tests::join_inner_one::batch_size_5_1 ... ok
test joins::hash_join::tests::join_inner_one::batch_size_1_8192 ... ok
test joins::hash_join::tests::join_inner_one_two_parts_left::batch_size_5_1
... ok
test joins::hash_join::tests::join_inner_one_two_parts_left::batch_size_2_10
... ok
test joins::hash_join::tests::join_inner_one_two_parts_left::batch_size_3_5
... ok
test joins::hash_join::tests::join_inner_one::batch_size_4_2 ... ok
test joins::hash_join::tests::join_inner_one_two_parts_left_randomly_ordered
... ok
test
joins::hash_join::tests::join_inner_one_two_parts_left::batch_size_1_8192 ... ok
test joins::hash_join::tests::join_inner_one_randomly_ordered ... ok
test
joins::hash_join::tests::join_inner_one_two_parts_right::batch_size_2_10 ... ok
test
joins::hash_join::tests::join_inner_one_two_parts_right::batch_size_1_8192 ...
ok
test joins::hash_join::tests::join_inner_one_two_parts_right::batch_size_3_5
... ok
test joins::hash_join::tests::join_inner_two::batch_size_1_8192 ... ok
test joins::hash_join::tests::join_inner_two::batch_size_4_2 ... ok
test joins::hash_join::tests::join_inner_two::batch_size_2_10 ... ok
test joins::hash_join::tests::join_inner_two::batch_size_3_5 ... ok
test joins::hash_join::tests::join_inner_two::batch_size_5_1 ... ok
test joins::hash_join::tests::join_inner_one_two_parts_right::batch_size_4_2
... ok
test joins::hash_join::tests::join_inner_one_two_parts_right::batch_size_5_1
... ok
test joins::hash_join::tests::join_inner_with_filter::batch_size_3_5 ... ok
test joins::hash_join::tests::join_inner_with_filter::batch_size_1_8192 ...
ok
test joins::hash_join::tests::join_inner_with_filter::batch_size_2_10 ... ok
test joins::hash_join::tests::join_inner_with_filter::batch_size_5_1 ... ok
test joins::hash_join::tests::join_inner_with_filter::batch_size_4_2 ... ok
test joins::sort_merge_join::tests::join_inner_two ... ok
test joins::sort_merge_join::tests::join_inner_one ... ok
test joins::sort_merge_join::tests::join_inner_two_two ... ok
test joins::sort_merge_join::tests::join_inner_output_two_batches ... ok
test joins::hash_join::tests::partitioned_join_inner_one::batch_size_2_10
... ok
test joins::sort_merge_join::tests::join_inner_with_nulls_with_options ... ok
test joins::sort_merge_join::tests::join_inner_with_nulls ... ok
test joins::hash_join::tests::partitioned_join_inner_one::batch_size_5_1 ...
ok
test joins::hash_join::tests::partitioned_join_inner_one::batch_size_4_2 ...
ok
test joins::hash_join::tests::partitioned_join_inner_one::batch_size_1_8192
... ok
test joins::hash_join::tests::partitioned_join_inner_one::batch_size_3_5 ...
ok
test joins::nested_loop_join::tests::join_inner_with_filter ... ok
test result: ok. 40 passed; 0 failed; 0 ignored; 0 measured; 688 filtered
out; finished in 0.03s
```
--
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]