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

   # Which issue does this PR close?
   
   - Part of https://github.com/apache/arrow-rs/issues/8987
   
   # Rationale for this change
   
   The logic to instantiate a type extension does not really depend on `Field`, 
other than indirectly because that struct happens to contain all the necessary 
bits of information. 
   
   As part of the work to make the JSON decoder support extension types, it was 
observed that a field is not always available (or at least, not desirable 
because it creates redundancy). This change addresses the concern by making it 
possible to work directly with extension types instead of being forced to route 
through a `Field` instance.
   
   # What changes are included in this PR?
   
   Factor out the body of `Field::try_extension_type` as a new associated 
function `ExtensionType::try_new_from_field_metadata` that takes data type and 
field metadata map and delegates to `ExtensionType::try_new`. 
`Field::try_extension_type` then simply calls that new method.
   
   # Are these changes tested?
   
   Code movement. Existing unit tests validate it.
   
   # Are there any user-facing changes?
   
   New provided trait method.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to