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

fix: empty strings and Nan in the sort command #3809

Merged
merged 2 commits into from
Sep 27, 2024

Conversation

BorysTheDev
Copy link
Contributor

@BorysTheDev BorysTheDev commented Sep 27, 2024

problem:
RPUSH key 0 -1 2 '' 32 nan
SORT key
The result is an error because of ''
Expected result: -1 '' 0 2 32

We didn't process empty strings for number sorting
Also prohibit Nan for number sorting

romange
romange previously approved these changes Sep 27, 2024
@BorysTheDev BorysTheDev changed the title fix: empty strings in the sort command fix: empty strings and NAN in the sort command Sep 27, 2024
src/server/generic_family.cc Show resolved Hide resolved
src/server/generic_family_test.cc Show resolved Hide resolved
src/server/generic_family_test.cc Outdated Show resolved Hide resolved
@BorysTheDev BorysTheDev enabled auto-merge (squash) September 27, 2024 09:09
@BorysTheDev BorysTheDev force-pushed the fix_empty_strings_in_sort branch from 8c1e2f7 to 7429c77 Compare September 27, 2024 09:22
@BorysTheDev BorysTheDev changed the title fix: empty strings and NAN in the sort command fix: empty strings in the sort command Sep 27, 2024
@BorysTheDev BorysTheDev changed the title fix: empty strings in the sort command fix: empty strings and Nan in the sort command Sep 27, 2024
Copy link
Contributor

@kostasrim kostasrim left a comment

Choose a reason for hiding this comment

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

LGTM

@BorysTheDev BorysTheDev merged commit 895567f into main Sep 27, 2024
12 checks passed
@BorysTheDev BorysTheDev deleted the fix_empty_strings_in_sort branch September 27, 2024 11:17
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.

3 participants