adriangb commented on issue #22079: URL: https://github.com/apache/datafusion/issues/22079#issuecomment-4431668966
> That would unblock my specific use of casting to a FieldRef. I'm also happy to PR this change. I think this would be a reasonable change. Cast operators knowing about type metadata makes sense. > Can you give some examples where metadata is communicating non-type information that would be useful to propagate and requires a cast and not a scalar function? I'm struggling to think of one atm, which is maybe a sign that the current behavior is wrong. I will see if I can remember what we were doing that https://github.com/apache/datafusion/pull/21390 fixed. > Whether it's correct or not, it is behaviour that has existed in 53 versions of DataFusion 🙂 Related to the point above: https://github.com/apache/datafusion/pull/21390 only made `try_cast` have the same behavior as `cast`. I don't know how back the `cast` behavior goes, but preserving source field metadata was happening before https://github.com/apache/datafusion/pull/21390. So I don't think it's fair to say casts have stripped arbitrary metadata for 53 versions. -- 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]
