[core][python][spark] Optimize data evolution write column metadata - #9574
Merged
JingsongLi merged 3 commits intoSep 3, 2026
Merged
Conversation
leaves12138
approved these changes
Sep 3, 2026
leaves12138
left a comment
Contributor
There was a problem hiding this comment.
Reviewed the persisted CREATE/ALTER workflow across Java, PyPaimon, and Spark, including historical-schema resolution, BLOB/vector dedicated files, stats, conflict detection, compaction, streaming discovery, and copy-files schema rebinding. Targeted Python tests passed, and the targeted Java tests passed except for a local CodeGenerator service-discovery failure unrelated to this change. No blocking issue found.
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
Reduce DataFileMeta size for wide data-evolution tables with dedicated BLOB or vector fields.
This adds the disabled-by-default
data-evolution.write-cols-optimization.enabledoption. When enabled, normal files containing every non-dedicated field omit the redundantwriteColslist, while dedicated files keep explicit columns.Readers in Java and Python resolve omitted metadata from the historical table schema. The change also covers stats evolution, conflict detection and rewrite, streaming column discovery, global-index refresh, Daft reads, and Spark copy-files schema rebinding.
For compatibility, persist the option with CREATE TABLE or ALTER TABLE so file schema versions record the compact representation, and upgrade all readers before enabling it.
Tests
mvn -pl paimon-core -am -Pfast-build -DfailIfNoTests=false -DwildcardSuites=none -Dtest=TableSchemaTest,BlobTableTest#testOmitWriteColsForAllNonDedicatedColumns,VectorStoreTableTest#testOmitWriteColsForAllNonDedicatedColumns,RowIdColumnConflictCheckerTest,FilesTableTest#testReadStatsWithOmittedNonDedicatedWriteCols,DataEvolutionUtilsTest testmvn -pl paimon-spark/paimon-spark-common -am -Pfast-build -Pspark3 -DfailIfNoTests=false -DwildcardSuites=none -Dtest=CopyFilesUtilTest testpython3 -m pytest -q pypaimon/tests/table_schema_test.py pypaimon/tests/blob_table_test.py pypaimon/tests/write/conflict_detection_test.py pypaimon/tests/ray_row_id_conflict_rewriter_test.py pypaimon/tests/vector_table_test.py::VectorTableWriteReadTest::test_vector_table_partial_update_non_vector_columnpython3 -m compileall -q pypaimongit diff --check