[fix](paimon) Accept required Variant array fallback value - #66626
Merged
yiguolei merged 1 commit intoAug 11, 2026
Merged
Conversation
Allow the unannotated Paimon Variant override to accept a required BYTE_ARRAY fallback leaf only for fallback-only array elements. Keep the standard annotated layout and all other shredded wrappers strict. Add schema boundary tests and verify materialization from a non-nullable fallback leaf. Jira: DORIS-27886
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 opinion: approval. I found no blocking correctness issue in the reviewed diff.
Critical checkpoints:
- External compatibility and scope: the relaxation is reachable only through the explicit Paimon table-schema Variant override. It admits the unannotated fallback-only array-element layout with a required
BYTE_ARRAY value, while annotated Parquet Variant groups, object-field wrappers, and array elements that also havetyped_valueretain strict validation. - Schema, nested-level, and materialization correctness: table/file/leaf identities are unchanged. The optional array-element wrapper and required payload remain in their existing repetition/definition-level domains; valid payloads reconstruct the Variant element, while null or missing array wrappers still return corruption. No decoder cursor, lifecycle, cache, resource-ownership, or hot-path performance behavior changes.
- Negative compatibility cases: focused tests preserve rejection for a required object fallback, a required fallback beside a typed carrier, and the same required fallback in an annotated Variant layout.
- Tests: the new schema test reaches the formerly rejected validation branch, and the materialization test validates the reconstructed array values. Existing nested sparse-filter/cross-page coverage exercises the same level-domain behavior. A generated Paimon-file end-to-end case for this exact layout, including null/empty arrays and small page/batch limits, would be useful additional hardening but is not blocking based on the traced production path.
- Review focus and convergence: no additional user focus was supplied. The complete four-file PR was reviewed; both the normal full-review and separate risk-focused Round 1 scans returned
NO_NEW_VALUABLE_FINDINGS, and no existing inline thread required duplicate suppression.
This review-only runner did not execute builds or tests; the conclusion is based on the authoritative diff, caller/implementation/test tracing, and the PR-reported validation.
Gabriel39
marked this pull request as ready for review
August 10, 2026 16:46
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
yiguolei
approved these changes
Aug 11, 2026
12 tasks
suxiaogang223
added a commit
to suxiaogang223/doris
that referenced
this pull request
Sep 3, 2026
### What problem does this PR solve? Issue Number: close apache#65086 Related PR: apache#66334, apache#66547, apache#66626 Problem Summary: Forward-port Variant V2 decoding across the Paimon Java scanner and native JNI bridge. The reader propagates nested access paths, materializes encoded Variant bytes into ColumnVariantV2, and accepts Paimon required-value leaves for fallback-only Variant arrays. ### Release note Improve Paimon Variant reads with nested projection and native Variant V2 materialization. ### Check List (For Author) - Test: Unit Test - Added Java vector/projection and BE Parquet schema/reader coverage; BE format/check, header hygiene, and FE checkstyle passed. Final compilation and test execution are deferred until all forward-port picks are complete. - Behavior changed: Yes, Paimon Variant reads support nested projection and fallback-array schemas. - Does this need documentation: No
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.
Problem
Paimon can write an unannotated shredded Variant array whose element wrapper contains only a required
BYTE_ARRAY valuefallback leaf. Doris already recognizes Paimon's optional wrapper groups, but rejected this required fallback leaf during Parquet schema validation.Changes
Validation
ParquetSchemaTest.*,VariantColumnReaderTest.*, andPaimonVariantReaderTest.*(82 tests passed).git diff --check.Jira: DORIS-27886