You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "wjones127 (via GitHub)" <gi...@apache.org> on 2023/07/11 17:25:27 UTC

[GitHub] [arrow-rs] wjones127 commented on issue #4472: Add an ExtensionType to DataType enum

wjones127 commented on issue #4472:
URL: https://github.com/apache/arrow-rs/issues/4472#issuecomment-1631210105

   > I personally think Field is the correct location for such metadata, imo DataType should only contain the information for kernels to interpret the physical array data. Concerns about nullability, specialized kernels for extension types, etc... I think should be handled at a higher level.
   
   I think that could be a decent approach, although I'm still trying to understand what that would look like. It sounds like the arrow-rs type system is closed, but can be wrapped in a higher-level type system. (whereas, the C++ kernels are extension-aware).
   
   So it sounds like the point to add extension types is when building extensions in datafusion. Eventually, I think it would be nice to have an example in arrow-datafusion showing how to add support for a simple extension type (such as UUID) in the engine. Basically the end result would be showing that 
   
   ```sql
   SELECT gen_random_uuid()
   ```
   
   outputs
   
   ```
   +--------------------------------------+
   | gen_random_uuid()                    |
   +--------------------------------------+
   | eeccb8c5-9943-b2bb-bb5e-222f4e14b687 |
   +--------------------------------------+
   
   ```
   
   Showing that you can add methods that output extension types (`gen_random_uuid()`) and that you can control how those extension types are displayed.


-- 
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-unsubscribe@arrow.apache.org

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