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

Panache - Support specifying whether NULLs come first or last when using Sort #26814

Closed
josephearl opened this issue Jul 19, 2022 · 2 comments
Closed
Labels
kind/enhancement New feature or request

Comments

@josephearl
Copy link

josephearl commented Jul 19, 2022

Description

When using ORDER BY in SQL you can specify where nulls should appear using NULLS FIRST or NULLS LAST, e.g. ORDER BY x DESC NULLS LAST

It would be nice to have this functionality available when using Sort.by and Sort.ascending etc.

Implementation ideas

Add directions ASCENDING_NULLS_FIRST, ASCENDING_NULLS_LAST, DESCENDING_NULLS_FIRST ... etc

Add shortcuts Sort.ascendingNullsFirst, Sort.ascendingNullsLast ... etc

@josephearl josephearl added the kind/enhancement New feature or request label Jul 19, 2022
@josephearl josephearl changed the title Support specifying whether NULLs come first or last when using Sort Panache - Support specifying whether NULLs come first or last when using Sort Jul 19, 2022
@Sgitario
Copy link
Contributor

This has been recently implemented in #26394.

Example: Sort.by("foo", Sort.NullPrecedence.NULLS_FIRST);

@josephearl
Copy link
Author

Awesome, in which case this can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants