Skip to content

Conversation

Jefffrey
Copy link
Contributor

Which issue does this PR close?

Part of #8185

Rationale for this change

Was checking through array functions and found array_sort doesn't handle LargeList arrays. Fix so it does.

What changes are included in this PR?

Handle LargeList arrays in array_sort

Are these changes tested?

Added SLT tests with LargeList as input (as well as FixedSizeList which was already supported).

Are there any user-facing changes?

No

@github-actions github-actions bot added the sqllogictest SQL Logic Tests (.slt) label Sep 19, 2025
@Jefffrey Jefffrey mentioned this pull request Sep 19, 2025
19 tasks
@Jefffrey Jefffrey marked this pull request as ready for review September 19, 2025 06:34
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thanks @Jefffrey -- this looks good to me

----
[NULL, NULL, -5, 1, 3, 5] [NULL, 1, 2, 3] [NULL, 3, 2, 1]

query ???
Copy link
Contributor

Choose a reason for hiding this comment

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

How does this work? Do we coerce FixedSizeList to ListArray?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, the signature specifies coercion from fixed size list to list (existing behaviour, just adding tests since I didn't spot any for fixed size lists)

array_coercion: Some(ListCoercion::FixedSizedListToList),

@Jefffrey Jefffrey added this pull request to the merge queue Sep 20, 2025
Merged via the queue into apache:main with commit 00f5b7d Sep 20, 2025
28 checks passed
@Jefffrey Jefffrey deleted the large-list-array-sort branch September 20, 2025 21:46
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.

2 participants