Skip to content

fix: workaround pandas bug causing merge index mismatch with empty partitions (#12564) - #12609

Open
iamdpsingh wants to merge 5 commits into
dask:mainfrom
iamdpsingh:iamdpsingh/fix/left-merge-empty-partitions
Open

iamdpsingh wants to merge 5 commits into
dask:mainfrom
iamdpsingh:iamdpsingh/fix/left-merge-empty-partitions

Conversation

@iamdpsingh

Copy link
Copy Markdown
Contributor

Fixes #12564. Normalizes output index to NaNs when doing a left/outer merge with left_index=True and right_on=True against an empty right dataframe, which works around a pandas bug where pandas incorrectly keeps the left index in that scenario. Adds test case for this edge case.

…rtitions (dask#12564)

- Normalizes output index to NaNs when doing a left/outer merge with left_index=True and right_on=True against an empty right dataframe, which works around a pandas bug where pandas incorrectly keeps the left index in that scenario.
- Adds test case for this edge case in test_merge.py.
@iamdpsingh
iamdpsingh force-pushed the iamdpsingh/fix/left-merge-empty-partitions branch from 8ceeae1 to 6d9416c Compare September 26, 2026 04:57
@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

     25 files  ± 0       25 suites  ±0   6h 34m 9s ⏱️ - 5m 50s
 19 915 tests + 1   18 482 ✅ + 1   1 433 💤 ±0  0 ❌ ±0 
379 373 runs  +20  332 099 ✅ +18  47 274 💤 +2  0 ❌ ±0 

Results for commit e848c65. ± Comparison against base commit 9dc535d.

♻️ This comment has been updated with latest results.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dask left merge carries over wrong index values in the presence of empty partitions

1 participant