LiaCastaneda commented on code in PR #22853: URL: https://github.com/apache/datafusion/pull/22853#discussion_r3518951719
########## datafusion/expr/src/higher_order_function.rs: ########## Review Comment: Also, the body is dynamic, which technically means for higher order functions indices positions can differ for each query no? for example if you have a Higher Order function with parameters (x,y,x) for a given query you can use x,y or y or all of them. This essentially means external callers of `LambdaArgument::new_with_used_params` would have to walk the body themselves to figure out which params are referenced. edit: is it actually possible to build a `LambdaArgument` like as an api? they are technically build in DF before calling the invoke_with_args api 🤔 so I guess `new_with_used_params` would only be called in `higher_order_function.rs` in `evaluate` inside DataFusion. If that's the case, I would consider resolving this inside `LambdaExpr` instead, keeping the fix self-contained there -- 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]
