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

Extract a bit_util for "BIT*" Commands #2076

Closed
2 tasks done
mapleFU opened this issue Jan 31, 2024 · 0 comments
Closed
2 tasks done

Extract a bit_util for "BIT*" Commands #2076

mapleFU opened this issue Jan 31, 2024 · 0 comments
Labels
enhancement type enhancement

Comments

@mapleFU
Copy link
Member

mapleFU commented Jan 31, 2024

Search before asking

  • I had searched in the issues and found no similar issues.

Motivation

Currently, we have 2 separate implemention for BITs, including Bitmap and BitmapString. To reducing the inconsistent bug and reducing the complexity of bit-operations, we need extract some common operations including:

  1. GetBit
  2. SetBit
  3. ...

e.g.:

  1. https://github.com/apache/arrow-rs/blob/50.0.0/parquet/src/util/bit_util.rs
  2. https://github.com/apache/arrow/blob/787afa1594586d2d556d21471647f9cd2c55b18f/cpp/src/arrow/util/bit_util.h

Solution

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@mapleFU mapleFU added the enhancement type enhancement label Jan 31, 2024
PragmaTwice pushed a commit that referenced this issue Feb 19, 2024
This is a refactor, see: #2076

Previously, adhoc bit operations are used. This patch extract `GetBit` and `SetBitTo` operation to simplify the impl.

Also, because the LSB/MSB format we're using it different in BitmapString and Bitmap( see apache/kvrocks-website#198 ), `lsb` and `msb` is extracted to prevent from mistakes.
@mapleFU mapleFU closed this as completed Feb 19, 2024
JoverZhang pushed a commit to JoverZhang/kvrocks that referenced this issue Feb 24, 2024
…e#2105)

This is a refactor, see: apache#2076

Previously, adhoc bit operations are used. This patch extract `GetBit` and `SetBitTo` operation to simplify the impl.

Also, because the LSB/MSB format we're using it different in BitmapString and Bitmap( see apache/kvrocks-website#198 ), `lsb` and `msb` is extracted to prevent from mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement type enhancement
Projects
None yet
Development

No branches or pull requests

1 participant