Skip to content

chore: Cleanup returning null arrays#20423

Merged
comphead merged 2 commits intoapache:mainfrom
neilconway:neilc/array-null-return-cleanup
Feb 19, 2026
Merged

chore: Cleanup returning null arrays#20423
comphead merged 2 commits intoapache:mainfrom
neilconway:neilc/array-null-return-cleanup

Conversation

@neilconway
Copy link
Contributor

Cleanup a few places where the code returned a null array but it would be a bit cleaner and faster to return a typed scalar null instead.

Which issue does this PR close?

Does not close an issue; this cleanup was mentioned in the code review for #20361

Rationale for this change

Returning a typed scalar null should be preferred to returning a null array: it still has type information, and avoids materializing an all-null array. The downstream consumer can always materialize the equivalent array if they want to.

What changes are included in this PR?

Cleanup five instances of this pattern.

Are these changes tested?

Yes. No new test cases possible/warranted.

Are there any user-facing changes?

No.

Cleanup a few places where the code returned a null array but it would
be a bit cleaner and faster to return a typed scalar null instead.
@neilconway
Copy link
Contributor Author

cc @Jefffrey

@github-actions github-actions bot added functions Changes to functions implementation spark labels Feb 18, 2026
Copy link
Contributor

@Jefffrey Jefffrey left a comment

Choose a reason for hiding this comment

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

❤️

@comphead comphead added this pull request to the merge queue Feb 19, 2026
Merged via the queue into apache:main with commit 0022d8e Feb 19, 2026
28 checks passed
@neilconway neilconway deleted the neilc/array-null-return-cleanup branch February 19, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

functions Changes to functions implementation spark

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments