gstvg commented on PR #23660: URL: https://github.com/apache/datafusion/pull/23660#issuecomment-5010178563
@alamb The public higher-order trait supports lambdas with multiple parameters but in the 54 release all built-in ones are single parameter, so this is only visible for user defined higher-order functions. I found a case in [sail, for example](https://github.com/lakehq/sail/blob/97169baf35640f59d4adf3e0c623954525824613/crates/sail-function/src/scalar/array/spark_array_filter.rs#L37-L43) Any query like ```sql SELECT array_filter(a, (v, i) -> b > 1) -- first parameter not used ``` would fail without the workaround sail is using. Before being merged, the array_transform in the lambda PR used to support two parameters (value, index) but I removed it to reduce the PR size, leaving this code path untested (at that time projection wasn't used so this bug didn't surfaced). In retrospect, this was not the best decision -- 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]
