C-Loftus opened a new pull request, #969:
URL: https://github.com/apache/arrow-go/pull/969

   ### Rationale for this change
   
   In https://github.com/apache/arrow-go/pull/960 I implemented write support 
for extension types by mapping a logical type to its underlying primitive/arrow 
type. In the case of geometry this allows the logical geometry type to be 
mapped to byte array for storage. 
   
   This PR implements the read path for that by adding the parquet type to 
arrow type functionality. For example, a user can read a parquet with a 
geometry column and with this change, the reader will try to map it to the 
designated associated arrow type.  
   
   ### What changes are included in this PR?
   
   An extension type can implement this interface to designate which arrow type 
should be used when reading it from parquet.
   
   ```go
   type ExtensionParquetLogicalType interface {
        ArrowTypeFromParquet(logical schema.LogicalType, storageType 
arrow.DataType) (arrow.ExtensionType, error)
   }
   ```
   
   The read path will try to iterate through all the extension types, see if 
there are any matches where the type implements `ArrowTypeFromParquet` and 
gives us something to map it to in arrow. If so we use that for reading. 
   
   ### Are these changes tested?
   
   Yes
   
   ### Are there any user-facing changes?
   
   Yes. Readers can now support arbitrary extension types as long as they are 
registered properly in the extension type registry.


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