mbutrovich commented on code in PR #1971: URL: https://github.com/apache/datafusion-comet/pull/1971#discussion_r2201477659
########## 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: I think the current approach is fine, and we can revisit it if the semantics seem awkward as we add better ANSI support to more functions. Thanks again! -- 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