Repository navigation
[Data] Preserve anti-join rows with an empty unknown-schema side - #66126
Merged
richardliaw merged 5 commits intoSep 14, 2026
Merged
Conversation
Synthesize a typed empty join-key table when one anti-join side has no blocks and its schema cannot be inferred. This lets shuffle V2 run the normal join path instead of dropping rows from the preserved side. Add coverage for both left and right anti joins with an unknown-schema empty input. Signed-off-by: viiccwen <[email protected]>
Contributor
Author
|
Hello @owenowenisme, PTAL. 🫡 |
Contributor
There was a problem hiding this comment.
Code Review
This pull request addresses an issue in anti joins where an empty side with an unknown schema would cause the preserved side's rows to be silently dropped. It resolves this by synthesizing the empty side's schema from the known side during left and right anti joins, and adds a corresponding test case. The review feedback suggests converting the key column name tuples to lists when calling PyArrow's select and rename_columns methods to ensure strict type compatibility.
Synthesize an empty join-key table whenever exactly one shuffle V2 join side has no blocks and no inferred schema. This lets the normal PyArrow join path preserve outer-join and anti-join semantics while keeping inner and semi joins empty.\n\nFactor the schema synthesis into a helper and extend coverage across all join types and both empty-side positions. Signed-off-by: viiccwen <[email protected]>
Contributor
Author
|
@owenowenisme Thx for reviewing! Updated. |
Signed-off-by: You-Cheng Lin <[email protected]>
owenowenisme
force-pushed
the
fix-data-empty-side-anti-join
branch
from
September 14, 2026 04:24
927e099 to
bfe30df
Compare
Use Ray Data's Schema union for the join reducer inputs and local side-table helper instead of Any. This documents the accepted Arrow/Pandas schema contract while preserving the existing runtime check for Arrow schemas. Signed-off-by: viiccwen <[email protected]>
Convert join-key name tuples to lists before calling PyArrow table APIs. PyArrow 17 requires a list for rename_columns, while newer local versions also accept tuples. Signed-off-by: viiccwen <[email protected]>
Contributor
Author
|
@owenowenisme it could be cleanly merged! |
owenowenisme
approved these changes
Sep 14, 2026
nadongjun
pushed a commit
to nadongjun/ray
that referenced
this pull request
Oct 6, 2026
…-project#66126) ## Description ShuffleV2 currently skips a join partition when one side has no blocks and its schema cannot be inferred. For left and right anti-joins, it's exception. When the unknown side of an anti-join is empty, this change synthesizes its join-key schema from the known side. The reducer can then use the normal join path and preserve the unmatched rows as expected. Edit: also narrow the schema type. ## Related issues closes ray-project#66125. --------- Signed-off-by: viiccwen <[email protected]> Signed-off-by: You-Cheng Lin <[email protected]> Co-authored-by: You-Cheng Lin <[email protected]>
chia7712
pushed a commit
to opensource4you/readme
that referenced
this pull request
Oct 23, 2026
Add a nomination under `fellowship/ray/` Suggested level: 30k Highlights from 2026-09-01 to 2026-10-11: - [Contribution](https://github.com/opensource4you/readme/blob/main/fellowship/ray/fellow-contribution/viiccwen/September/report.md) - Merged 10 Ray Data PRs and filed 8 issues in 6 weeks - Made shuffle tasks up to 12.84x faster by pinning the fused map function, so large UDF closures are no longer serialized again for every shuffle task ([#65480](ray-project/ray#65480)) - Built a memory observability series to help users avoid OOM: exported task peak USS and logical memory metrics with Grafana charts ([#65666](ray-project/ray#65666), [#66044](ray-project/ray#66044)), added a warning with a suggested memory value when it is set below 1.25x max USS ([#65512](ray-project/ray#65512)), and updated the OOM prevention docs ([#65509](ray-project/ray#65509)) - Found, reported and fixed silent data loss in hash-shuffle (V2) anti joins, where rows were dropped when the other side was empty and had an unknown schema ([#66126](ray-project/ray#66126)) - Reviewed other fellows' PRs with suggestions ([#66878](ray-project/ray#66878)) - Merged the most PRs and filed the most issues of all Ray Fellowship participants - Solid work for an early contributor
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
ShuffleV2 currently skips a join partition when one side has no blocks and its schema cannot be inferred. For left and right anti-joins, it's exception.
When the unknown side of an anti-join is empty, this change synthesizes its join-key schema from the known side. The reducer can then use the normal join path and preserve the unmatched rows as expected.
Edit: also narrow the schema type.
Related issues
closes #66125.