Skip to content

[branch-53] Bring any_match support#128

Merged
LiaCastaneda merged 1 commit into
DataDog:branch-53from
LiaCastaneda:lia/bring-any-match-support
May 26, 2026
Merged

[branch-53] Bring any_match support#128
LiaCastaneda merged 1 commit into
DataDog:branch-53from
LiaCastaneda:lia/bring-any-match-support

Conversation

@LiaCastaneda
Copy link
Copy Markdown

cherry-picks apache#21903.

This change will be included in the v54 release

## 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 apache#123` indicates that this PR will close issue apache#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.
It seems like a natural first addition alongside `array_transform` and
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.

---------

Co-authored-by: Dmitrii Blaginin <dmitrii@blaginin.me>
@datadog-prod-us1-5
Copy link
Copy Markdown

Pipelines

Fix all issues with BitsAI

⚠️ Warnings

🚦 1 Pipeline job failed

Rust | build and run with wasm-pack   View in Datadog   GitHub Actions

🛟 This job is unlikely to succeed on retry. Please review your pipeline configuration. Dependency download failed: 404 Not Found when trying to download wasm-pack from GitHub releases.

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 3afc264 | Docs | Datadog PR Page | Give us feedback!

@LiaCastaneda LiaCastaneda merged commit e0f3307 into DataDog:branch-53 May 26, 2026
29 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants