tobixdev commented on PR #18552:
URL: https://github.com/apache/datafusion/pull/18552#issuecomment-3517262325

   Thanks @paleolimbot for your input!
   
   > It might be a nice addition to this demonstration the code required to 
integrate this to Expr such that Display for an Expr::Literal or the CLI 
printer can make use of this (maybe an optimizer rule could hydrate any 
unresolved logical types?). I like the LogicalType as an endpoint but it is a 
valid concern that it might disrupt the existing logical Expr and such a 
demonstration might help alleviate that concern.
   > 
   > The ExprField idea I had was basically to start with struct ExprField { 
inner: FieldRef } (breaking change) and slowly migrate to struct ExprField { 
logical_type: LogicalType, nullability: bool, ... <other stuff?>} in a 
non-breaking way. It's very possible that going straight to the LogicalType is 
just as easy to do (I haven't tried it!).
   
   I totally agree! I was trying to add `ExprField` or something similar (e.g., 
extending `DFField`) to `Expr::Literal` but just couldn't find the time to do 
the necessary plumbing. I think the central point here will be how we allow 
creating these things from code that was not designed with an extension type 
registry in mind. In other words, we have to use something akin to unresolved 
or wire the registry through everything.
   


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