disq commented on PR #34631:
URL: https://github.com/apache/arrow/pull/34631#issuecomment-1505652140

   > I only have one outstanding comment/question left.
   
   @zeroshade I can't seem to comment on your comment on the line so quoting it 
here
   
   > I'm still a little confused here, what's the situation (or string of 
events) where Deserialize is being called on something that is already an 
extension type? Shouldn't `Deserialize` only get called if the type isn't yet 
an extension type and we have metadata saying it should be?
   
   The original call sites for `ext.Deserialize` seems to be in 
`arrjson/arrjson.go:FieldWrapper.UnmarshalJSON()` and 
`ipc/metadata.go:typeFromFB`, which existed before this PR. This PR adds a 
third call site, in `pqarrow/schema.go:applyOriginalStorageMetadata()`, which 
seem to do the same thing. In summary, they all work like:
   
   - We have some data in a known storage type, and an extension name, 
`extName` in metadata.
   - Call `arrow.GetExtensionType(extName)`.
   - If the ext is registered this will get an ext object with the correct 
(extension) type. (if not, all call sites keep the storage type as-is)
   - Then call this newly created ext object's `Deserialize` method to get data 
into the object.
   


-- 
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