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

Add BIT support to BITPOS #2170

Merged
merged 13 commits into from
Mar 20, 2024
Merged

Add BIT support to BITPOS #2170

merged 13 commits into from
Mar 20, 2024

Conversation

sheharyaar
Copy link
Contributor

This pull requests adds BIT support to BITPOS.
Fixes : #1212

Signed-off-by: Mohammad Shehar Yaar Tausif <[email protected]>
Signed-off-by: Mohammad Shehar Yaar Tausif <[email protected]>
@sheharyaar
Copy link
Contributor Author

For review questions, please refer : #1212 (comment)

tests/cppunit/types/bitmap_test.cc Outdated Show resolved Hide resolved
src/types/redis_bitmap.cc Outdated Show resolved Hide resolved
src/types/redis_bitmap.cc Outdated Show resolved Hide resolved
src/types/redis_bitmap.cc Show resolved Hide resolved
sheharyaar and others added 3 commits March 16, 2024 15:36
Signed-off-by: Mohammad Shehar Yaar Tausif <[email protected]>
Signed-off-by: Mohammad Shehar Yaar Tausif <[email protected]>
@mapleFU
Copy link
Member

mapleFU commented Mar 16, 2024

This general LGTM. I'm suffering from working overtime today, so I'll take a carefully look tomorrow

@sheharyaar
Copy link
Contributor Author

@mapleFU, there is an issue that needs to be discussed : #1212 (comment)

Please take a look at it when your free.

src/common/status.h Outdated Show resolved Hide resolved
Signed-off-by: Mohammad Shehar Yaar Tausif <[email protected]>
Signed-off-by: Mohammad Shehar Yaar Tausif <[email protected]>
@sheharyaar sheharyaar marked this pull request as ready for review March 17, 2024 21:16
jihuayu
jihuayu previously approved these changes Mar 18, 2024
Copy link
Member

@jihuayu jihuayu left a comment

Choose a reason for hiding this comment

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

So careful test case. Thank you!

src/types/redis_bitmap.cc Show resolved Hide resolved
src/types/redis_bitmap_string.cc Show resolved Hide resolved
src/types/redis_bitmap.cc Outdated Show resolved Hide resolved
Signed-off-by: Mohammad Shehar Yaar Tausif <[email protected]>
src/common/bit_util.h Outdated Show resolved Hide resolved
src/types/redis_bitmap.cc Outdated Show resolved Hide resolved
src/types/redis_bitmap.cc Show resolved Hide resolved
}

*pos = util::msb::RawBitpos(reinterpret_cast<const uint8_t *>(string_value.data()) + byte_start, bytes_cnt, bit);

Copy link
Member

Choose a reason for hiding this comment

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

Should we check byte_stop here?

Copy link
Member

Choose a reason for hiding this comment

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

Oh, my bad, it handle the case in is_bit_index

@mapleFU
Copy link
Member

mapleFU commented Mar 18, 2024

Rest LGTM, this part of logic is too tricky, thanks a lot for efforts

@mapleFU
Copy link
Member

mapleFU commented Mar 19, 2024

@sheharyaar Would you mind resolve conflict? I edit the GetMetadata in https://github.com/apache/kvrocks/pull/2174/files . Will approve after that

@mapleFU
Copy link
Member

mapleFU commented Mar 20, 2024

Will merge it tonight if no negative comments

@mapleFU mapleFU merged commit 1be51b1 into apache:unstable Mar 20, 2024
30 checks passed
Copy link

sonarcloud bot commented Mar 20, 2024

@mapleFU
Copy link
Member

mapleFU commented Mar 20, 2024

Merged, thanks!

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.

BITPOS doesn't support BIT option
3 participants