Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMJ producing different results than HashJoin when doing a semi join #10886

Closed
Tracked by #9846
edmondop opened this issue Jun 12, 2024 · 8 comments · Fixed by #10891 or #11041
Closed
Tracked by #9846

SMJ producing different results than HashJoin when doing a semi join #10886

edmondop opened this issue Jun 12, 2024 · 8 comments · Fixed by #10891 or #11041
Assignees
Labels
bug Something isn't working

Comments

@edmondop
Copy link
Contributor

Describe the bug

As a part of #10728 we have added tests for semi join, and on the first merge on main they failed (they always passed). I have ignored that tests for now but that failure suggests a bug . It only happened once in several builds, and on the AMD64 architecture

---- fuzz_cases::join_fuzz::test_semi_join_1k_filtered stdout ----
thread 'fuzz_cases::join_fuzz::test_semi_join_1k_filtered' panicked at datafusion/core/tests/fuzz_cases/join_fuzz.rs:416:13:
assertion `left == right` failed: SortMergeJoinExec and HashJoinExec produced different row counts
  left: 100
 right: 99
stack backtrace:
   0: rust_begin_unwind

see https://github.com/apache/datafusion/actions/runs/9475682375/job/26107451352

To Reproduce

https://github.com/apache/datafusion/actions/runs/9475682375/job/26107451352

Expected behavior

Should pass

Additional context

No response

@comphead
Copy link
Contributor

the behavior is not deterministic, I ran tests on my local and it fails 1 run of 3, checking

@eejbyfeldt
Copy link
Contributor

eejbyfeldt commented Jun 13, 2024

I think this should be reopened or we should open a separate issue. The test flaked here: https://github.com/apache/datafusion/actions/runs/9501960117/job/26188803965?pr=10898 and I was able to make it flake locally as well.

@jonahgao jonahgao reopened this Jun 13, 2024
@jonahgao
Copy link
Member

I think this should be reopened or we should open a separate issue. The test flaked here: https://github.com/apache/datafusion/actions/runs/9501960117/job/26188803965?pr=10898 and I was able to make it flake locally as well.

Reopened it. I encountered the same failure. https://github.com/apache/datafusion/actions/runs/9502397050/job/26190267777?pr=10903

@comphead
Copy link
Contributor

Thanks @eejbyfeldt and @jonahgao I'll comment the test now and run more tests on top of it to see where the spontaneous bug is.

@comphead
Copy link
Contributor

Filed #10904
Will run the test in the loop to find out where the issue is

@comphead comphead self-assigned this Jun 13, 2024
@comphead
Copy link
Contributor

Found that SMJ left semi sometimes have a duplicated row in the output, I'm trying to make a test case

@edmondop
Copy link
Contributor Author

This is interesting! At least breaking the build was worth it

@comphead
Copy link
Contributor

I think I'm able to reproduce it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants