comphead commented on code in PR #23660:
URL: https://github.com/apache/datafusion/pull/23660#discussion_r3625850423
##########
datafusion/sqllogictest/src/test_context.rs:
##########
@@ -712,3 +718,91 @@ fn register_async_abs_udf(ctx: &SessionContext) {
let udf = AsyncScalarUDF::new(Arc::new(async_abs));
ctx.register_udf(udf.into_scalar_udf());
}
+
+fn register_multi_arg_lambda_udf(ctx: &SessionContext) {
+ // In 54 release, all built-in higher-order functions are
single-parameter, but the public higher-order trait supports
+ // user defined functions with multi-parameter lambdas. To test the lambda
handling of multiple parameters, we create
+ // a dummy udf that provides every value argument it receives as a
parameter to it's lambda, the last argument:
+ // multi_arg_higher_order_udf([..value_args], ([..value_args_as_params])
-> ...)
+ #[derive(Debug, PartialEq, Eq, Hash)]
+ struct MultiArgHigherOrderUdf {
+ signature: HigherOrderSignature,
+ }
+
+ impl HigherOrderUDFImpl for MultiArgHigherOrderUdf {
Review Comment:
it would be better to preserve casing, UDF vs Udf. However its already
inconsistent in DF codebase for other objects
--
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]