mbrobbel commented on PR #5176:
URL: https://github.com/apache/arrow-rs/pull/5176#issuecomment-1843493451

   > 
https://github.com/apache/arrow/blob/92723f34f8df40b35e5840e61011c00766808014/format/Schema.fbs
 is the canonical list of types within the arrow data model.
   > 
   
   I'm interested in [extension 
types](https://arrow.apache.org/docs/format/Columnar.html#extension-types).
   
   > > For example, consider a custom UUID extension type. It could be stored 
in a fixed-size list layout (as suggested in the docs), but it's also valid to 
store it in a fixed-size primitive layout (using u128s).
   > 
   > It could also be stored as a `uuid::UUID` which happens to transmute 
safely to `[u8; 16]`, does this mean we should derive ArrowNativeType for 
`UUID`? 
   
   No, I think we should only implement it for `[T; N]` where `T: 
ArrowNativeType`. I consider the conversion to a "logical type" (in this case 
an extension type for a uuid) another layer.
   
   > If the intention is to use this for `FixedSizeBinary` I wonder if you 
could just use a normal `Buffer` and then use something like bytemuck to safely 
transmute the `[u8]` to the desired `[T]`.
   
   I'm trying to use this for the physical fixed-size primitive layout, which 
in my mind is like a `Vec<T>` where `T: ArrowNativeType`.


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