Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add list_reverse function #8477

Merged
merged 4 commits into from
Aug 7, 2023
Merged

Add list_reverse function #8477

merged 4 commits into from
Aug 7, 2023

Conversation

maiadegraaf
Copy link
Contributor

Add a rewrite for list_reverse(l) as well the alias array_reverse(l).

select list_reverse([1,2,3,4,5]);
┌──────────────────────────────────────────────┐
│ list_reverse(main.list_value(1, 2, 3, 4, 5)) │
│                   int32[]                    │
├──────────────────────────────────────────────┤
│ [5, 4, 3, 2, 1]                              │
└──────────────────────────────────────────────┘

The tests are from #7132

Copy link
Contributor

@taniabogatsch taniabogatsch left a comment

Choose a reason for hiding this comment

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

Thanks for the rewrite-PR; it looks good! :) I only have one comment.

I was also wondering if there is any interesting information in this older rewrite PR...

src/catalog/default/default_functions.cpp Outdated Show resolved Hide resolved
@github-actions github-actions bot marked this pull request as draft August 7, 2023 06:29
@maiadegraaf maiadegraaf marked this pull request as ready for review August 7, 2023 06:37
@Mytherin Mytherin merged commit ae065fc into duckdb:master Aug 7, 2023
53 checks passed
@Mytherin
Copy link
Collaborator

Mytherin commented Aug 7, 2023

Thanks! LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants