Skip to content

docs: clarify NULL handling for array_remove functions (#21014)#21018

Merged
comphead merged 4 commits intoapache:mainfrom
Xavrir:docs/issue-21014-array-null-handling
Mar 22, 2026
Merged

docs: clarify NULL handling for array_remove functions (#21014)#21018
comphead merged 4 commits intoapache:mainfrom
Xavrir:docs/issue-21014-array-null-handling

Conversation

@Xavrir
Copy link
Copy Markdown
Contributor

@Xavrir Xavrir commented Mar 18, 2026

Summary

  • clarify how array_remove, array_remove_n, and array_remove_all behave when the input array contains NULL values
  • document that a NULL element argument returns NULL instead of removing NULL entries from the array
  • add examples that show existing NULL array elements are preserved when removing a non-NULL value

Testing

  • docs-only change, no code paths changed

Closes #21014

@github-actions github-actions bot added documentation Improvements or additions to documentation functions Changes to functions implementation labels Mar 18, 2026
Copy link
Copy Markdown
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Xavrir I'd suggest to leave only documentation updates, I think the test attached duplicating what we already have in the codebase

@Xavrir
Copy link
Copy Markdown
Contributor Author

Xavrir commented Mar 18, 2026

Thanks for pointing that out. I trimmed the duplicated tests and kept the PR focused on the documentation update in 38fa468.

@Xavrir Xavrir requested a review from comphead March 20, 2026 18:21
Fix CI failure in prettier formatting check by reformatting the markdown table in expressions.md to comply with prettier 2.7.1 rules.
Copy link
Copy Markdown
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Xavrir lgtm

@comphead comphead added this pull request to the merge queue Mar 22, 2026
Merged via the queue into apache:main with commit 646d183 Mar 22, 2026
31 checks passed
de-bgunter pushed a commit to de-bgunter/datafusion that referenced this pull request Mar 24, 2026
…apache#21018)

## Summary
- clarify how `array_remove`, `array_remove_n`, and `array_remove_all`
behave when the input array contains `NULL` values
- document that a `NULL` `element` argument returns `NULL` instead of
removing `NULL` entries from the array
- add examples that show existing `NULL` array elements are preserved
when removing a non-`NULL` value

## Testing
- docs-only change, no code paths changed

Closes apache#21014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation functions Changes to functions implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doc: Explain NULLs handling for array_* builtin functions

2 participants