pepijnve commented on code in PR #18921:
URL: https://github.com/apache/datafusion/pull/18921#discussion_r3004965802
##########
datafusion/expr/src/expr.rs:
##########
@@ -404,6 +406,104 @@ pub enum Expr {
OuterReferenceColumn(FieldRef, Column),
/// Unnest expression
Unnest(Unnest),
+ /// Call a lambda function with a set of arguments.
+ ///
+ /// For example, `array_transform([1,2,3], v -> v+1)` would be equivalent
to:
+ ///
+ /// ```text
+ /// LambdaFunction(array_transform)
+ /// ├── args[0]: Literal([1,2,3])
+ /// └── args[1]: Lambda
+ /// ├── params: ["v"]
+ /// └── body: BinaryExpr(+)
+ /// ├── LambdaVariable("v")
+ /// └── Literal(1)
+ /// ```
+ LambdaFunction(LambdaFunction),
Review Comment:
Should we call this a higher-order function instead? Calling it a 'lambda
function' is bit misleading. In the literature at least that's the name used
for the `Lambda` type below.
Is this going to be limited to only anonymous inline functions or will it be
possible to pass a scalar UDF name as the function parameter as well?
--
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]