milenkovicm commented on issue #18477:
URL: https://github.com/apache/datafusion/issues/18477#issuecomment-3551825160

   I think your proposal makes sense @timsaucer .
   
   One proposal, not related to your PR directly.  `ExtensionCodecs` are 
provided when there is a new physical/logical extension. When you need to 
deliver two artefacts for it, the actual extension and `ExtensionCodecs` which 
have to be merged into the current extension codec or added to some kind of 
composite extension codec.  
   
   Would it make sense to add `ToSerialized` and `FromSerialzed` traits which 
extensions could implement directly, and make them usable without altering 
current extension codec? 
   
   We would have to register `FromSerialzed` somewhere, like session context or 
similar so we could do reverse lookup for deserialisation. We would probably 
have specialised version of `To/FromSerialized` for each type we currently 
cover by extension codec, but that needs investigation.
   
    We could follow similar approach to substrait extensions 
   
   ```json
   pub struct Extension {
       pub extension_url: String,
       pub extension_as_blob: Bytes,
   }
   ```
   
   where extensions would declare `extension_url` which would identify them at 
deserialiation point.
   
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to