fix: don't drop field metadata on merge insert path#5927
Merged
westonpace merged 2 commits intolance-format:mainfrom Feb 10, 2026
Merged
fix: don't drop field metadata on merge insert path#5927westonpace merged 2 commits intolance-format:mainfrom
westonpace merged 2 commits intolance-format:mainfrom
Conversation
Contributor
Code ReviewSummary: This PR fixes a bug where field metadata was lost during merge_insert operations by cloning the entire field instead of reconstructing it without metadata. The fix is minimal and correct. ✅ Review Result: ApprovedThe fix is straightforward and correct: // Before: Field metadata (including JSON extension type info) was lost
Arc::new(arrow_schema::Field::new(field.name(), field.data_type().clone(), field.is_nullable()))
// After: Full field clone preserves metadata
Arc::new(field.clone())Test coverage: Comprehensive tests added for JSON data across multiple operations (append, compaction, merge_insert). No blocking issues found. |
Member
Author
|
Possibly related to #4831 but I don't think this closes that as I don't have all merge insert paths tested yet (and I know some of them use the |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
LuQQiu
approved these changes
Feb 10, 2026
github-actions Bot
pushed a commit
that referenced
this pull request
Feb 11, 2026
There are various ways to write data and several of them are failing for JSON data at the moment because it requires a conversion from logical to physical representation. I'd like to rework this more generally but I want to get the current implementation working first. This fixes one of the merge_insert paths which is currently failing because the field metadata is lost as part of the operation (and so the data appears to be a normal string column and is not converted)
jackye1995
pushed a commit
that referenced
this pull request
Feb 12, 2026
There are various ways to write data and several of them are failing for JSON data at the moment because it requires a conversion from logical to physical representation. I'd like to rework this more generally but I want to get the current implementation working first. This fixes one of the merge_insert paths which is currently failing because the field metadata is lost as part of the operation (and so the data appears to be a normal string column and is not converted)
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.
There are various ways to write data and several of them are failing for JSON data at the moment because it requires a conversion from logical to physical representation. I'd like to rework this more generally but I want to get the current implementation working first. This fixes one of the merge_insert paths which is currently failing because the field metadata is lost as part of the operation (and so the data appears to be a normal string column and is not converted)