pitrou commented on PR #39200:
URL: https://github.com/apache/arrow/pull/39200#issuecomment-1852307954

   > There's also a more passive yet controlled approach: We add a 
`std::vector<std::string> allowed_implicit_casting_functions_` member to each 
ExtensionType and we implicit cast it only for those functions.
   
   That would work but that means a lot of work for each extension type to 
follow additions to the range of default compute functions.
   
   I would suggest we perhaps need a more general semantic description of 
storage type equivalence.
   issues?q=is%3Aissue+involves%3Aozankabak+
   Draft:
   ```c++
   class ExtensionType {
    public:
     // Storage equivalence for equality testing and hashing
     static constexpr uint32_t kEquality = 1;
     // Storage equivalence for ordered comparisons
     static constexpr uint32_t kOrdering = 2;
     // Storage equivalence for selections (filter, take, etc.)
     static constexpr uint32_t kSelection = 4;
     // Storage equivalence for arithmetic
     static constexpr uint32_t kArithmetic = 8;
     // Storage equivalence for explicit casts
     static constexpr uint32_t kCasting = 16;
     // Storage equivalence for all operations
     static constexpr uint32_t kAny = std::numeric_limits<uint32_t>::max();
   
     // By default, an extension type can be implicitly handled as its storage 
type
     // for selections, equality testing and hashing.
     virtual uint32_t storage_equivalence() const { return kEquality | 
kSelection; }
   ```
   
   @felipecrv WDYT?
   
   @alamb @tustvold How do you handle extension types in Datafusion?


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