Repository navigation
[CELEBORN-2570] Exclude row length prefixes from sort fast-write dataSize - #3987
Open
huangxiaopingRD wants to merge 1 commit into
Open
huangxiaopingRD wants to merge 1 commit into
huangxiaopingRD wants to merge 1 commit into
Conversation
huangxiaopingRD
force-pushed
the
fix-sort-writer-data-size
branch
from
November 20, 2026 10:53
d603ac0 to
97e863a
Compare
This branch has not been deployed
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.
What changes were proposed in this pull request?
Count
rowSizein the SQLdataSizemetric inSortBasedShuffleWriter.fastWrite0. Add regression coverage comparing sort and hash writers with fast-write enabled and disabled, for both buffered and giant records.Why are the changes needed?
The sort fast-write path currently includes the 4-byte row length prefix in SQL
dataSize, while Spark'sUnsafeRowSerializerand Celeborn's hash fast-write path count only row bytes. Three 16-byte rows therefore report 60 bytes instead of 48 bytes. The regression tests also verify that the serialized records still contain 60 bytes including the prefixes.JIRA: https://issues.apache.org/jira/browse/CELEBORN-2570
Does this PR resolve a correctness bug?
This fixes SQL metric accounting. No effect on real AQE decisions has been measured.
Does this PR introduce any user-facing change?
The SQL
dataSizemetric for sort fast-write excludes row length prefixes, matching normal serialization and hash fast-write.How was this patch tested?
mvn -B -ntp -Pspark-3.3 -pl client-spark/spark-3 -am test -Dtest=SortBasedShuffleWriterSuiteJ,HashBasedShuffleWriterSuiteJ -DwildcardSuites=none -DfailIfNoTests=false(JDK 17): all 29 tests passed (17 sort, 12 hash), including the new data-size comparisons.git diff --checkpassed.