Spark: Reduce TestRewriteDataFilesAction data volume to speed up CI#16565
Open
wombatu-kun wants to merge 1 commit into
Open
Spark: Reduce TestRewriteDataFilesAction data volume to speed up CI#16565wombatu-kun wants to merge 1 commit into
wombatu-kun wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
Thanks for the PR! this was one of the optimizations I observed as well. |
Contributor
|
btw so a 50% reduction should drop ~6 minutes in total wall time for spark-ci 🥳 |
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.
Part of #16397.
TestRewriteDataFilesActionis the #2 slowest Spark test class inspark-ci(~12.4 min in the profiling gist linked from #16397). It is parameterized only onformatVersion = [2, 3, 4]— each version is meaningful (v2 position deletes, v3 deletion vectors, v4 Parquet manifests) — so its matrix cannot be trimmed. Its runtime is instead dominated by data volume: a sharedSCALE = 400000consumed by ~50@TestTemplatemethods that each write and then rewrite ~400k rows, across three format versions.What changed
Most methods only assert on file/snapshot counts and rewrite structure, which do not depend on the absolute row count, so they now use a small
SCALE = 400. The few methods whose assertions genuinely depend on large files keep the original volume via a newLARGE_SCALE = 400000constant, so they stay byte-for-byte equivalent:testBinPackSplitLargeFile,testBinPackCombineMixedFiles,testBinPackCombineMediumFiles,testAutoSortShuffleOutput, andtestZOrderSort. This mirrors the siblingTestRewritePositionDeleteFilesAction, which already usesSCALE = 4000.The same change is applied identically to the v3.5, v4.0, and v4.1 Spark trees.
Measured impact
Measured locally as the JUnit testsuite time summed across the three
formatVersionsuites, three runs each, viacleanTest test --no-build-cache(forces real re-execution, no cache):That is a ~54% reduction (≈60% at warm steady-state). Test counts and pass/fail are unchanged across all three trees, so coverage is preserved — only the data volume shrank.