paleolimbot opened a new issue, #18060:
URL: https://github.com/apache/datafusion/issues/18060

   ### Is your feature request related to a problem or challenge?
   
   The current `Expr::Cast` can't represent a cast to an extension type because 
it uses `DataType` as the target:
   
   
https://github.com/apache/datafusion/blob/77ec31981af1dbc32af7931f1c8f510c2e3f47c1/datafusion/expr/src/expr.rs#L1009-L1016
   
   I noticed this in #17986 because a FieldRef is a way to support extension 
types like UUID in SQL but this information will get dropped when constructing 
the logical plan.
   
   (I'd personally love this so that we can support casting to 
GEOMETRY/GEOGRAPHY in SedonaDB)
   
   ### Describe the solution you'd like
   
   Update the internal representation of the `Cast` to use a FieldRef or add an 
`Option<FieldMetadata>` to it so that it can express the operation of casting 
to an arbitrary type.
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


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