Skip to content

fix: maintain inner list nullability for array_sort - #19948

Merged
comphead merged 2 commits into
apache:mainfrom
Jefffrey:fix-array-sort-inner-nullability
Jan 25, 2026
Merged

comphead merged 2 commits into
apache:mainfrom
Jefffrey:fix-array-sort-inner-nullability

Conversation

@Jefffrey

@Jefffrey Jefffrey commented Jan 23, 2026 •

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

#17657 introduced a regression since it cloned the inner field in the execution path but in the return_type function it still set nullability to true. Fix to ensure we maintain the field of the inner field as is.

What changes are included in this PR?

Change return_type to just pass through the input datatype as is.

Also refactor away usage of a null buffer builder in favour of copying the input array null buffer.

Are these changes tested?

Added tests.

Are there any user-facing changes?

No.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: array_sort fails on list with inner non-nullable field

3 participants