Skip to content

Conversation

@tisonkun
Copy link
Member

@tisonkun tisonkun commented Jan 3, 2024

This closes #1978 .

Signed-off-by: tison <[email protected]>

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 ..

@sonarqubecloud
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
@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