[python][ray] Avoid routing shuffle in self-merge updates - #9335
Draft
XiaoHongbo-Hope wants to merge 1 commit into
Draft
[python][ray] Avoid routing shuffle in self-merge updates#9335XiaoHongbo-Hope wants to merge 1 commit into
XiaoHongbo-Hope wants to merge 1 commit into
Conversation
XiaoHongbo-Hope
force-pushed
the
codex/ray-self-merge-no-shuffle
branch
from
August 21, 2026 06:00
6f57492 to
35ce199
Compare
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.
Purpose
Ray
_ROW_IDself-merge already avoids the source-target join, but its update path still sends every transformed row through a_FIRST_ROW_IDhash shuffle before writing. This adds avoidable network, object-store, and scheduling overhead for large column updates.Changes
first_row_idfile groups and dispatcheach group directly to a bounded Ray task
CommitMessages and commit once on the driverThis bounds task materialization to one logical file group rather than a packed split. The public API is unchanged. Callable assignments from #9327 reuse the same path; general source-target merge and self-merge delete paths are unchanged.
Tests
Dataset.groupby()is disabledread_columnsand VARIANT transformations work without the shuffleray_data_evolution_merge_into_test.py: 115 passedray_update_by_row_id_test.py: 16 passedgit diff --checkpassedLocal filesystem microbenchmark shaped like the reported workload (Ray 2.56.1, 4 CPUs, append-only data-evolution table with row tracking, 100,000 rows, 20 files, 65 clips per file, and 1–3 KiB VARIANT payloads): master with the routing shuffle took 5.43/5.57 s; this PR took 1.45/1.50 s (about 3.7x). The callable performs
variant_get, negates four DOUBLE paths, and writes them withvariant_replace. All 60,060 matched rows and 39,940 unmatched rows were verified after every run. This is a local directional result, not a production-table claim.