Preserve field metadata when coercing INT96 timestamps - #24790
Open
ryzhyk wants to merge 1 commit into
Open
Conversation
Fixes apache#24786 `Int96Coercer` rebuilds every struct, list and map field with `Field::new_struct`, `Field::new_list` and `Field::new`, which start from empty metadata. Leaf fields go through `field_with_new_type`, which clones the field, so only container fields are affected, and only when the file holds an INT96 column: the same file read without `coerce_int96` keeps its metadata. Carry `current_field.metadata()` across in the three constructors. Signed-off-by: Leonid Ryzhyk <ryzhyk@gmail.com>
12 tasks
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #24790 +/- ##
==========================================
- Coverage 81.53% 81.53% -0.01%
==========================================
Files 1123 1123
Lines 406041 406074 +33
Branches 406041 406074 +33
==========================================
+ Hits 331049 331073 +24
- Misses 55631 55636 +5
- Partials 19361 19365 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Which issue does this PR close?
Int96Coercerdrops the metadata of struct, list and map fields. #24786.Rationale for this change
Int96Coercerrebuilds every struct, list and map field withField::new_struct,Field::new_listandField::new, which start from empty metadata. Leaf fields go throughfield_with_new_type, which clones the field, so only container fields are affected, and only when the file holds an INT96 column: the same file read withoutcoerce_int96keeps its metadata.What changes are included in this PR?
Carry
current_field.metadata()across in the three constructors.Are these changes tested?
yes
Are there any user-facing changes?