Omega359 opened a new pull request, #16970:
URL: https://github.com/apache/datafusion/pull/16970

   ## Which issue does this PR close?
   
   Closes https://github.com/apache/datafusion/issues/13519
   
   This is a continuation of @alamb's PR 
https://github.com/apache/datafusion/pull/16661
   
   Relates to: 
   
   https://github.com/apache/datafusion/issues/12892
   https://github.com/apache/datafusion/issues/13519
   https://github.com/apache/datafusion/issues/13212
   https://github.com/apache/datafusion/issues/10368
   
   Alternative to:
   
   https://github.com/apache/datafusion/pull/16573
   https://github.com/apache/datafusion/pull/16661
   
   ## Rationale for this change
   
   Allow udf's to access df config to allow for their behaviour to change based 
on configuration. For example, allows date and timestamp udf's to use a 
different timezone than UTC or to allow date/timestamp parsing to have ANSI 
behaviour when parsing fails.
   
   ## What changes are included in this PR?
   
   - Add an `Arc<ConfigOptions>` to `ExecutionProps` when the execution is 
started
   - Add `ConfigOptions` to `ScalarFunctionArgs`
   - AsyncScalarUdf.invoke_async_with_args(..) removed the config_options arg
   - OptimizerConfig.options() return value changed from `&ConfigOptions` to 
`Arc<ConfigOptions>']`
   - a bunch of fn's in the proto code had the argument `registry: &dyn 
FunctionRegistry` changed to `ctx: &SessionContext`
   - new test
   
   Note that there is two todo's in ffi/src/udf/mod.rs related to the serdes of 
config options in ScalarFunctionArgs. This PR doesn't do any serdes for that.
   
   ## Are these changes tested?
   
   Existing tests + a new test 'test_config_options_work_for_scalar_func' in 
user_defined_scalar_functions.rs
   
   ## Are there any user-facing changes?
   
   Yes, breaking changes as listed above.
   


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

Reply via email to