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

Fix:fix HashJoin projection swap #12967

Merged

Conversation

my-vegetable-has-exploded
Copy link
Contributor

@my-vegetable-has-exploded my-vegetable-has-exploded commented Oct 16, 2024

Which issue does this PR close?

ref #12491, #10978

If there is embeded projection in HashJoinExec, no need to add projection above hashjoin after swapping join order.

Thanks @onursatici for catching it.

Rationale for this change

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 Oct 16, 2024
@my-vegetable-has-exploded
Copy link
Contributor Author

ptal @korowa @Dandandan

Copy link
Contributor

@korowa korowa left a comment

Choose a reason for hiding this comment

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

Looks like a proper fix as this projection is, indeed, redundant for projected HJ.

Thank you @my-vegetable-has-exploded

datafusion/core/src/physical_optimizer/join_selection.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@berkaysynnada berkaysynnada left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @my-vegetable-has-exploded -- after you have fixed the clippy errors, we can merge this PR

@korowa korowa merged commit e9435a9 into apache:main Oct 18, 2024
24 checks passed
@my-vegetable-has-exploded my-vegetable-has-exploded deleted the fix-hash-join-projection-swap branch October 19, 2024 02:54
@my-vegetable-has-exploded
Copy link
Contributor Author

thanks @korowa @berkaysynnada

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.

4 participants