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

refactor: replace some usage of MutableBitmap by BitVec #610

Merged
merged 2 commits into from
Nov 21, 2022

Conversation

evenyag
Copy link
Contributor

@evenyag evenyag commented Nov 21, 2022

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

This PR replaces some usage of MutableBitmap by BitVec:

  • VectorOp::find_unique()
  • BatchOp::find_unique()
  • DedupReader now buffers the BitVec and resets it before each iteration.

As the official arrow doesn't have a mutable bitmap struct, this PR could help reduce some migration work.

Note that the ListVectorBuilder still requires MutableBitmap.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

@evenyag evenyag marked this pull request as ready for review November 21, 2022 09:18
@codecov
Copy link

codecov bot commented Nov 21, 2022

Codecov Report

Merging #610 (f989890) into develop (62fcb54) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop     #610      +/-   ##
===========================================
- Coverage    86.41%   86.40%   -0.02%     
===========================================
  Files          400      400              
  Lines        50671    50650      -21     
===========================================
- Hits         43788    43764      -24     
- Misses        6883     6886       +3     
Flag Coverage Δ
rust 86.40% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/common/base/src/lib.rs 100.00% <ø> (ø)
src/datatypes/src/vectors/boolean.rs 89.76% <ø> (-0.71%) ⬇️
src/storage/src/read.rs 92.99% <ø> (ø)
src/datatypes/src/vectors/operations.rs 100.00% <100.00%> (ø)
...rc/datatypes/src/vectors/operations/find_unique.rs 100.00% <100.00%> (ø)
src/storage/src/read/dedup.rs 100.00% <100.00%> (ø)
src/storage/src/schema/projected.rs 97.53% <100.00%> (ø)
src/servers/src/error.rs 27.02% <0.00%> (-8.11%) ⬇️
src/servers/src/opentsdb/codec.rs 98.93% <0.00%> (-0.36%) ⬇️
src/meta-srv/src/service/heartbeat.rs 87.36% <0.00%> (+1.05%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@waynexia waynexia left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@v0y4g3r v0y4g3r left a comment

Choose a reason for hiding this comment

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

LGTM

@v0y4g3r v0y4g3r merged commit 0791c65 into GreptimeTeam:develop Nov 21, 2022
@evenyag evenyag deleted the refactor/replace-mutable-bitmap branch November 21, 2022 09:45
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
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.

3 participants