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

Minor: SMJ fuzz tests fix for rowcounts #10891

Merged
merged 4 commits into from
Jun 12, 2024
Merged

Minor: SMJ fuzz tests fix for rowcounts #10891

merged 4 commits into from
Jun 12, 2024

Conversation

comphead
Copy link
Contributor

Which issue does this PR close?

Closes #10886.

Rationale for this change

The fuzz tests for filtered SMJ introduced in #10728 has a flaw when calculating the rowcounts, it fact it caculcated batches which are not always the same and led to false negatives.

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added the core Core DataFusion crate label Jun 12, 2024
@comphead
Copy link
Contributor Author

@edmondop cc

@edmondop
Copy link
Contributor

Thanks, why does changing the threshold fix the problem?

@comphead
Copy link
Contributor Author

comphead commented Jun 12, 2024

Thanks, why does changing the threshold fix the problem?

it doesn't fix the threshold, the method name renamed, I think it takes less than 100 right?

The actual fix is how to calculate rowcounts.

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @comphead -- thank you for the review @edmondop

);
// row level compare if any of joins returns the result
// the reason is different formatting when there is no rows
if smj_rows > 0 || hj_rows > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I double checked that the assert on row count is done higher up 👍

@alamb alamb merged commit 908a3a1 into apache:main Jun 12, 2024
23 checks passed
findepi pushed a commit to findepi/datafusion that referenced this pull request Jul 16, 2024
* Fix: Sort Merge Join crashes on TPCH Q21

* Fix LeftAnti SMJ join when the join filter is set

* rm dbg

* Minor: Fix fuzz testing row counts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SMJ producing different results than HashJoin when doing a semi join
3 participants