Skip to content

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

Description

@edmondop

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

Activity

  1. comphead commented on Jun 12, 2024

    @comphead
    Contributor

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

  2. eejbyfeldt commented on Jun 13, 2024

    @eejbyfeldt
    Contributor

    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.

  3. jonahgao commented on Jun 13, 2024

    @jonahgao
    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

  4. comphead commented on Jun 13, 2024

    @comphead
    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.

  5. comphead commented on Jun 13, 2024

    @comphead
    Contributor

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

  6. self-assigned this
    on Jun 13, 2024
  7. comphead commented on Jun 13, 2024

    @comphead
    Contributor

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

  8. edmondop commented on Jun 13, 2024

    @edmondop
    ContributorAuthor

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

  9. comphead commented on Jun 20, 2024

    @comphead
    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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions