Omega359 commented on code in PR #18025:
URL: https://github.com/apache/datafusion/pull/18025#discussion_r2500688744
##########
datafusion/functions/src/macros.rs:
##########
@@ -59,6 +59,24 @@ macro_rules! export_functions {
}
};
+ // function that requires config and takes a vector argument
+ (single $FUNC:ident, $DOC:expr, @config $arg:ident,) => {
+ #[doc = $DOC]
+ pub fn $FUNC($arg: Vec<datafusion_expr::Expr>) ->
datafusion_expr::Expr {
+ use datafusion_common::config::ConfigOptions;
+ super::$FUNC(&ConfigOptions::default()).call($arg)
Review Comment:
> Can someone remind me why we are going through all the trouble of
threading the ConfigOptions down into the functions, when the code to create
the functions just passes in the default ConfigOptions?
>
> Shouldn't the current ConfigOptions be passed in? If so perhaps we can do
this as a follow on PR
Config options as part of the constructor is only really required for
functions that need config_options for simplify. Anything that needs it during
invoke_with_args should just get it via the ScalarFunctionArgs.
--
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]