rishvin commented on code in PR #1971: URL: https://github.com/apache/datafusion-comet/pull/1971#discussion_r2201439622
########## native/spark-expr/src/comet_scalar_funcs.rs: ########## @@ -53,13 +54,23 @@ macro_rules! make_comet_scalar_udf { ); Ok(Arc::new(ScalarUDF::new_from_impl(scalar_func))) }}; + ($name:expr, $func:ident, without $data_type:ident, $fail_on_error:ident) => {{ + let scalar_func = CometScalarFunction::new( + $name.to_string(), + Signature::variadic_any(Volatility::Immutable), + $data_type, + Arc::new(move |args| $func(args, $fail_on_error)), + ); + Ok(Arc::new(ScalarUDF::new_from_impl(scalar_func))) + }}; } /// Create a physical scalar function. pub fn create_comet_physical_fun( fun_name: &str, data_type: DataType, registry: &dyn FunctionRegistry, + fail_on_error: Option<bool>, Review Comment: Thanks @mbutrovich. I used Option<bool> under the assumption that the `fail_on_error` flag may not be applicable to all functions. Using `fail_on_error = None` indicates that this flag will be irrelevant to the corresponding `fun_name`. Since `fail_on_error = true|false` means whether to execute operation in ANSI|non-ANSI mode, `Option<bool>` would indicate that ANSI|non-ANSI mode not applicable to that function. Let me know if you think a default `false` would be more appropriate/consistent here instead. -- 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