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 parse BITCOUNT #1979

Merged
merged 2 commits into from
Jan 3, 2024
Merged

Fix parse BITCOUNT #1979

merged 2 commits into from
Jan 3, 2024

Conversation

tisonkun
Copy link
Member

@tisonkun tisonkun commented Jan 3, 2024

This closes #1978 .

Signed-off-by: tison <wander4096@gmail.com>
@@ -113,6 +118,15 @@ class CommandBitCount : public Commander {
stop_ = *parse_stop;
}

if (args.size() == 5) {
if (util::EqualICase(args[4], "BYTE")) {
} else if (util::EqualICase(args[4], "BIT")) {
Copy link
Member Author

Choose a reason for hiding this comment

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

BIT modifier is supported in Redis 7.0.

But we assume counting in bytes everywhere so it's non-trivial to implement. It can be a follow-up issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

@tisonkun
Copy link
Member Author

tisonkun commented Jan 3, 2024

The patch is trivial and it's not worthy to add a test case ..

Copy link

sonarqubecloud bot commented Jan 3, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
No data about Coverage
2.1% Duplication on New Code

See analysis details on SonarCloud

@tisonkun tisonkun merged commit 36bab87 into apache:unstable Jan 3, 2024
29 checks passed
@tisonkun tisonkun deleted the fix-bitcount branch January 3, 2024 04:31
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.

BITCOUNT return wrong when args > 4
4 participants