-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Support BYTE|BIT in BITCOUNT and BITPOS commands #2116
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
Conversation
|
In this case, I'd guess we want an overload, e.g. with |
Yes, I was considering that but we can't make a default if we overload. @NickCraver I can do overload without a default if you think it's better |
|
We can do with a default, we just need to make sure not to break the old method - see #2098 where I'm doing a setup to ensure it's not broken by testing all overload options someone could be using - we'd want to do the same here. You could merge that PR branch in here and point this PR at that branch instead of |
|
@NickCraver Ready :) |
NickCraver
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alrighty tried to give this a good pass. Sorry time isn't on my side this week, but this is looking great - just about good to go :)
Co-authored-by: Nick Craver <[email protected]>
Co-authored-by: Nick Craver <[email protected]>
Co-authored-by: Nick Craver <[email protected]>
Co-authored-by: Nick Craver <[email protected]>
Co-authored-by: Nick Craver <[email protected]>
Change Bit & Byte order
NickCraver
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking awesome - thank you for the tweaks and compat checks!
The new features were added to Redis 7: now the indexes of both commands (BITCOUNT and BITPOS) can be specified in BITs instead of BYTEs.
(Also added tests for BitPosition since it was missing)