[VL][Delta] Offload Delta OPTIMIZE compaction command transactions#12024
Open
malinjawi wants to merge 2 commits intoapache:mainfrom
Open
[VL][Delta] Offload Delta OPTIMIZE compaction command transactions#12024malinjawi wants to merge 2 commits intoapache:mainfrom
malinjawi wants to merge 2 commits intoapache:mainfrom
Conversation
10 tasks
4d3a448 to
8da75af
Compare
8da75af to
e2d0a90
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.
What changes are proposed in this pull request?
This PR adds standalone Delta OPTIMIZE compaction command offload for the Velox backend.
It lets Delta
OPTIMIZEbin-pack compaction transactions run throughGlutenOptimisticTransactionwhen native Delta write is enabled, so the compaction read/write command path can use Gluten's native Delta transaction handling.Main changes:
GlutenDeltaRunnableCommand, a wrapper for non-leaf DeltaRunnableCommandimplementationsOptimizeTableCommandin the Delta command offload rule for compaction-only OPTIMIZEOPTIMIZE ... WHEREOPTIMIZE ZORDER BYREORGFULLOPTIMIZEOPTIMIZE delta.\path``OPTIMIZE table_nameOPTIMIZE ... WHEREpartition-predicate compactionThis PR is intentionally compaction-only:
Those belong in follow-up PRs under the Delta optimization tracker.
Issue: #12025.
How was this patch tested?
Added and expanded Delta native write coverage in:
backends-velox/src-delta33/test/scala/org/apache/spark/sql/delta/DeltaNativeWriteSuite.scalabackends-velox/src-delta40/test/scala/org/apache/spark/sql/delta/DeltaNativeWriteSuite.scalaValidation run locally:
DeltaNativeWriteSuite+ClusteredTableClusteringSuite: 8 tests passedDeltaNativeWriteSuite+ClusteredTableClusteringSuite: 8 tests passedDeltaNativeWriteSuite+ClusteredTableClusteringSuite: 16 tests passedWas this patch authored or co-authored using generative AI tooling?
Generated-by: OpenAI Codex