[branch-52] Cherry-pick apache/datafusion#20533#96
Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit intoDataDog:branch-52from Mar 26, 2026
Conversation
LiaCastaneda
approved these changes
Mar 26, 2026
## Which issue does this PR close? - Closes apache#20526. ## Rationale for this change Per Postgres and the SQL spec, `cardinality()` of an empty array should be zero; we previously returned `NULL`. Along the way, fix another bug: we previously returned `0` for the cardinality of an untyped `NULL` and `NULL` for the cardinality of a typed null (e.g., `NULL::int[]`). We should return `NULL` in both cases. ## What changes are included in this PR? Bug fixes, update SLT. ## Are these changes tested? Yes. ## Are there any user-facing changes? Yes: the behavior of `cardinality` has changed, albeit the previous behavior was incorrect. (cherry picked from commit e684994)
41f238b to
201c016
Compare
8498635
into
DataDog:branch-52
30 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cherry-picks apache#20533
necessary to cherry pick in #95 which has a fix for
string_to_array