[fix](iceberg) Preserve schema for partition evolution#65870
Open
Gabriel39 wants to merge 1 commit into
Open
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
Contributor
Author
|
/review |
Contributor
There was a problem hiding this comment.
Automated review conclusion: approval opinion; no blocking correctness issue found.
- Goal and scope: This behavior-neutral refactor preserves the existing all-column Iceberg schema initialization and adds a focused FE unit test showing that a non-projected column remains in
history_schema_info. The patch is small, clear, and aligned with the stated partition-evolution invariant. - Data correctness and parallel paths: For an older non-identity-spec file, FE emits no identity partition constant for the evolved source column. Classic Parquet/ORC readers and format-v2 therefore use the complete schema metadata to resolve and read the physical field; newer identity-spec files can use their split constant. Eager/lazy split assignment and both scanner generations retain the same shared params. No missed parallel path was found.
- Concurrency, lifecycle, and errors: No new threads, locks, shared mutable lifecycle, status handling, or exception boundary are introduced.
UserExceptionpropagation and scan-parameter lifetime are unchanged. - Compatibility, persistence, configuration, and writes: No Thrift field, persisted format, configuration, transaction, data-write path, or rolling-upgrade contract changes. The existing Iceberg semantics-version boundary remains intact.
- Tests and results: The new deterministic unit test directly protects the FE all-column serialization seam even when the evolved column is absent from query slots. Existing partition-evolution regression coverage exercises old physical data after adding an identity partition. An exact bucket-to-identity ORC case across both scanner modes would expand the matrix but is not required to establish this behavior-neutral change. Per the review-runner contract, I performed static review only and did not run builds or tests locally.
- Performance and observability: Runtime work and allocations are unchanged; no new hot-path cost, logging, or metric need was introduced.
- User focus: No additional user-provided focus points were supplied.
All applicable Doris critical checkpoints were reviewed, and no actionable finding remains.
Contributor
TPC-H: Total hot run time: 29339 ms |
Contributor
TPC-DS: Total hot run time: 177180 ms |
Contributor
ClickBench: Total hot run time: 25.12 s |
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 problem does this PR solve?
Related PR: #65502
Problem Summary:
Iceberg partition evolution may classify a column as an identity partition column because of a newer partition spec, while files written by an older spec (for example,
bucket(3, int_col)) still store that column physically. Pruning the reader schema to query slots can therefore make matching rows from older ORC files disappear when a predicate references the evolved column.#65502 already made Iceberg scans send the complete schema for equality-delete dependencies. This PR records that the same invariant is required for partition evolution and adds a focused FE unit test proving that a non-projected evolved partition column remains in the reader schema.
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)