LiaCastaneda opened a new pull request, #21903: URL: https://github.com/apache/datafusion/pull/21903
## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. --> - Closes #. ## Rationale for this change `array_any_match` is a commonly supported higher-order function in systems like Spark (`exists`), Trino (`any_match`) among other engines. I think this is a basic first to have function (aside from `array_transform`) and something worth upstreaming I think. ## What changes are included in this PR? Adds `array_any_match(array, predicate)` as a new higher-order function (with aliases `any_match` and `list_any_match`). It returns: `true` if any element satisfies the predicate `false` if no element does (including empty arrays) `null` if the predicate returns null for some elements and false for all others ## Are these changes tested? Yes I added unit tests and sqllogic tests ## Are there any user-facing changes? Yes -- new SQL functions array_any_match, any_match, and list_any_match are available. -- 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]
