HHH-19826 Add array_reverse and array_sort functions
Implements array_reverse() and array_sort() HQL functions.
array_reverse(array)- Returns reversed arrayarray_sort(array [, descending [, nulls_first]])- Returns sorted array- Default: ASC, NULLs last
- Follows PostgreSQL 18 semantics
All database tests pass.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion. For more information on licensing, please check here.
https://hibernate.atlassian.net/browse/HHH-19826
Thanks for your pull request!
This pull request appears to follow the contribution rules.
› This message was automatically generated.
Thanks for the guidance @beikov. I've addressed all the review comments.
Thanks for the detailed review @beikov.
Changed as requested in https://github.com/hibernate/hibernate-orm/commit/0813a4caa4e382dd6078422d29f97bf368612f17
@beikov Additionally updated array_sort emulations(PostgreSQLArraySortEmulation,HSQLArraySortFunction) to use array[] fallback with case when wrapper for consistency.
Great job, thanks!
FYI, we will be merging this PR next week when we branch off for 7.2 and main becomes 7.3