Skip to content

Add BIT support to BITPOS#2170

Merged
mapleFU merged 13 commits into
apache:unstablefrom
sheharyaar:feat-bitpos-bit
Mar 20, 2024
Merged

Add BIT support to BITPOS#2170
mapleFU merged 13 commits into
apache:unstablefrom
sheharyaar:feat-bitpos-bit

Conversation

@sheharyaar

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

Comment thread tests/cppunit/types/bitmap_test.cc Outdated
Comment thread src/types/redis_bitmap.cc Outdated
Comment thread src/types/redis_bitmap.cc Outdated
Comment thread src/types/redis_bitmap.cc
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

mapleFU commented Mar 16, 2024

Copy link
Copy Markdown
Member

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

@sheharyaar

Copy link
Copy Markdown
Contributor Author

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

Please take a look at it when your free.

Comment thread src/common/status.h Outdated
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
@git-hulk
git-hulk requested review from jihuayu and mapleFU March 18, 2024 01:52
jihuayu
jihuayu previously approved these changes Mar 18, 2024

@jihuayu jihuayu left a comment

Copy link
Copy Markdown
Member

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!

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

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

Copy link
Copy Markdown
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
Copy Markdown
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

mapleFU commented Mar 18, 2024

Copy link
Copy Markdown
Member

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

@mapleFU

mapleFU commented Mar 19, 2024

Copy link
Copy Markdown
Member

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

@mapleFU

mapleFU commented Mar 20, 2024

Copy link
Copy Markdown
Member

Will merge it tonight if no negative comments

@mapleFU
mapleFU merged commit 1be51b1 into apache:unstable Mar 20, 2024
@sonarqubecloud

Copy link
Copy Markdown

@mapleFU

mapleFU commented Mar 20, 2024

Copy link
Copy Markdown
Member

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