scovich opened a new pull request, #8360:
URL: https://github.com/apache/arrow-rs/pull/8360

   * NOTE: Stacked on https://github.com/apache/arrow-rs/pull/8359/ -- ignore 
the first two commits
   
   # Which issue does this PR close?
   
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax.
   
   - Closes #NNN.
   
   # Rationale for this change
   
   There is currently no good way to populate a new variant array with variant 
values that reference an existing metadata, but that functionality is needed 
when transforming existing variant data (e.g. for shredding and unshredding 
operations).
   
   # What changes are included in this PR?
   
   Add a new `VariantValueArrayBuilder` that does not try to create new 
metadata; instead, it wraps a `ReadOnlyMetadata` around the `VariantMetadata` 
instance of the `Variant` value being inserted. This takes advantage of the new 
generic `ParentState` capability.
   
   NOTE: The new array builder does _not_ impl `VariantBuilderExt` because it 
does not have a `MetadataBuilder` instance -- the instance is created on demand 
as part of the insertion itself. This avoids the considerable complexity of 
keeping an internal metadata column index in sync with whatever external 
indexing might produce the variant value to be appended. It also doesn't seem 
to matter -- I did some pathfinding of variant shredding (going from binary to 
shredded variant based on some target schema), and the `VariantBuilderExt` does 
not seem helpful for that code.
   
   # Are these changes tested?
   
   New unit tests.
   
   # Are there any user-facing changes?
   
   No (the class is not currently exported outside the module that declares it)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to