refactor(blob): refactor BlobFileContext to honor the actual schema when classifying BLOB fields#332
Open
lxy-9602 wants to merge 4 commits into
Open
refactor(blob): refactor BlobFileContext to honor the actual schema when classifying BLOB fields#332lxy-9602 wants to merge 4 commits into
lxy-9602 wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors BlobFileContext::Create to classify BLOB fields based on the intersection of (a) option-configured field lists and (b) the BLOB columns actually present in the provided (possibly projected) Arrow schema, preventing absent columns from being incorrectly treated as inline/view/descriptor/external-storage fields. It also removes now-unused per-field query helpers and updates unit tests accordingly.
Changes:
- Filter descriptor/view/inline/external-storage field sets to only include BLOB fields present in the provided schema.
- Derive
blob_file_fieldsfrom “schema BLOB fields minus inline fields” (schema-aware). - Remove
Is*Fieldquery helpers and adjust/add tests for partial-schema behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/paimon/core/operation/blob_file_context.h | Removes unused Is*Field helpers from the public API. |
| src/paimon/core/operation/blob_file_context.cpp | Makes field classification schema-aware by intersecting option lists with BLOB fields present in the given schema. |
| src/paimon/core/operation/blob_file_context_test.cpp | Updates tests to use set getters and adds coverage for projected/partial schema scenarios. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Linked issue: #283
Classify BLOB fields by intersecting the option-configured fields with the columns actually present in the given schema, so partial (projected) schemas no longer pull in absent fields. Also removes the unused
Is*Fieldquery helpers.Tests
BlobFileContextTest.PartialSchemaIgnoresAbsentFields
BlobFileContextTest.PartialSchemaWithOnlyBlobFileField
API and Format
Documentation
Generative AI tooling
Generated-by: Claude-4.8-Opus