Omega359 commented on PR #13527: URL: https://github.com/apache/datafusion/pull/13527#issuecomment-2794063751
> Another idea: > > Since [`ExecutionProps`](https://docs.rs/datafusion/latest/datafusion/execution/context/struct.ExecutionProps.html) is already threaded all the way through and is intended to > > > Holds per-query execution properties and data (such as statement starting timestamps). > > What if you added the necessary state (like "SQL mode") and then copied that through (possibly all the way to ScalarFunctionArgs) 🤔 > > https://docs.rs/datafusion/latest/datafusion/logical_expr/struct.ScalarFunctionArgs.html > > It would still be some plumbing but it might be much less invasive as ExecutionProps is already sent many places -- ExecutionProps is also already very small 🤔 Hmm. 🤔 It would mean that we would have to copy things at execution time from ConfigOptions to an instance of ExecutionProps (timezone, sql mode, whatever we deem useful) and perhaps others ([Extensions](https://github.com/apache/datafusion/blob/d2fe308eb15b43bf0a9b5a40652252cd93dd227d/datafusion/common/src/config.rs#L762) comes to mind) though I don't think that would be horribly difficult. Perhaps we could use Vec<[ConfigEntry](https://github.com/apache/datafusion/blob/main/datafusion/common/src/config.rs#L728)> for this - or map<key, ConfigEntry> so consumers don't have to iterate the options to find the one they are interested in. I agree that this approach would be very much less invasive. I actually like this approach a bit more than [your other idea of adding yet another function](https://github.com/apache/datafusion/pull/13527#issuecomment-2789191368) to the UDF's to set the config_options on them. It would also allow for per-query changes since session variables would then be accessible to UDF's. Unless someone can poke a pretty big hole in this approach I'll start another branch and work on this. -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org