[GLUTEN-10215][VL] Delta write: Preserve partition columns when required#12069
Draft
malinjawi wants to merge 2 commits into
Draft
[GLUTEN-10215][VL] Delta write: Preserve partition columns when required#12069malinjawi wants to merge 2 commits into
malinjawi wants to merge 2 commits into
Conversation
bf0a64a to
d185350
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 were proposed in this pull request?
This patch preserves partition columns in native partition split output only when Delta's write contract includes those partition columns in
dataColumns.The change:
This is the second split from #12016. It is stacked on #12016 and should be reviewed after that PR merges.
Why are the changes needed?
Some Delta write modes keep partition columns in the writer batch. The native splitter should preserve those columns only for those modes, while the Delta stats tracker must still compute AddFile stats over Delta data columns only.
Does this PR introduce any user-facing change?
No public API change. This improves correctness for native Delta partitioned writes.
How was this patch tested?
Built locally and ran:
JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home \ ./dev/run-scala-test.sh --force \ -Pjava-17,spark-4.0,scala-2.13,backends-velox,hadoop-3.3,spark-ut,delta \ -pl backends-velox \ -s org.apache.spark.sql.delta.DeltaNativeWriteSuite \ -t "native delta Iceberg-compatible partitioned write should collect stats"Result: 1 test passed, 0 failures.
Also ran the partitioned optimized write layout regression test on the stacked branch, Spark 4.0
backends-veloxtest compilation, C++gluten/veloxnative build, andgit diff --check.Related issue: #10215