FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix panic on RightMark hash joins when propagating ordering by Tpt · Pull Request #24718 · apache/datafusion · GitHub

Fix panic on RightMark hash joins when propagating ordering - #24718

Merged
alamb merged 1 commit into
apache:mainfrom
Tpt:tpt/issue-24717
Aug 27, 2026
Merged

Fix panic on RightMark hash joins when propagating ordering#24718
alamb merged 1 commit into
apache:mainfrom
Tpt:tpt/issue-24717

Conversation

Tpt commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

Fixes a panic in enforce_sorting when given a RightMark hash join: HashjoinExec::maintains_input_order has been changed to also return true on RightMark but enforce_sorting has not been updated

What changes are included in this PR?

Adds support of RightMark joins to enforce_sorting they keep the input sorting.

`maintains_input_order` has been changed to also return `true` on `RightMark` but this function has not been updated

Close apache#24717
github-actions Bot added optimizer Optimizer rules core Core DataFusion crate labels Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.45%. Comparing base (a38bb10) to head (3b969f4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24718      +/-   ##
==========================================
- Coverage   81.45%   81.45%   -0.01%     
==========================================
  Files        1120     1120              
  Lines      401289   401289              
  Branches   401289   401289              
==========================================
- Hits       326871   326866       -5     
- Misses      55295    55300       +5     
  Partials    19123    19123              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

alamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thank you @Tpt

JoinType::RightSemi | JoinType::RightAnti | JoinType::RightMark => {
map_fields(plan.right().schema(), JoinSide::Right)
}
_ => unreachable!("unexpected join type: {}", plan.join_type()),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

To make this more defensive, it would be great to make this unreachable into an internal error

alamb added this pull request to the merge queue Aug 27, 2026
Merged via the queue into apache:main with commit 1038d35 Aug 27, 2026
41 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate optimizer Optimizer rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DF 55: physical-optimizer enforce_sorting panics on RightMark joins

3 participants


Back | FazBrowse Home | New Git URL