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

feat: Add null bitmap concatenater #34914

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sunby
Copy link
Contributor

@sunby sunby commented Jul 23, 2024

Signed-off-by: sunby <sunbingyi1992@gmail.com>
@sre-ci-robot sre-ci-robot added the size/L Denotes a PR that changes 100-499 lines. label Jul 23, 2024
@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sunby
To complete the pull request process, please assign czs007 after the PR has been reviewed.
You can assign the PR to them by writing /assign @czs007 in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mergify mergify bot added dco-passed DCO check passed. kind/feature Issues related to feature request from users do-not-merge/missing-related-issue labels Jul 23, 2024
Copy link
Contributor

mergify bot commented Jul 23, 2024

@sunby Please associate the related issue to the body of your Pull Request. (eg. “issue: #”)

Signed-off-by: sunby <sunbingyi1992@gmail.com>
@mergify mergify bot added the ci-passed label Jul 23, 2024
Copy link

codecov bot commented Jul 23, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 80.97%. Comparing base (1f55061) to head (8429777).
Report is 4 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #34914      +/-   ##
==========================================
+ Coverage   80.96%   80.97%   +0.01%     
==========================================
  Files        1185     1182       -3     
  Lines      142715   143107     +392     
==========================================
+ Hits       115544   115876     +332     
- Misses      22760    22812      +52     
- Partials     4411     4419       +8     
Files Coverage Δ
internal/core/src/common/NullBitmapConcatenater.h 100.00% <100.00%> (ø)
...nternal/core/src/common/NullBitmapConcatenater.cpp 83.78% <83.78%> (ø)

... and 236 files with indirect coverage changes

void
AddBitmap(uint8_t* bitmap, size_t size);

// Do not call this function multiple times
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we make NullBitmapConcatenater a function instead of a class, then?

Copy link
Contributor Author

@sunby sunby Jul 23, 2024

Choose a reason for hiding this comment

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

Can we make NullBitmapConcatenater a function instead of a class, then?

it's ok if we define a function called NullBitmapConcatenater but I prefer to use a class to manage allocated memory.

for (const auto& bitmap : bitmaps_) {
if (bitmap.first == nullptr) {
// nullptr means nullable is false or no null value
// set offset to offset + bitmap.second bits are 0
Copy link
Contributor

Choose a reason for hiding this comment

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

0 means the is not null right? null_bitmap_data taken from arrow, 0 means is null here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

0 means the is not null right? null_bitmap_data taken from arrow, 0 means is null here.

oh yes, they use validity maps so 0 is invalid. I will fix it later.

@smellthemoon
Copy link
Contributor

by the way,is it necessary to provide isValid(index) or isNull(index) in bitmap concatenater?

@alexanderguzhva
Copy link
Contributor

@sunby It might be a better idea to use the bitset library from src/bitset. Please check src/bitset/element_wise.h for op_copy()function

@sunby
Copy link
Contributor Author

sunby commented Jul 26, 2024

@sunby It might be a better idea to use the bitset library from src/bitset. Please check src/bitset/element_wise.h for op_copy()function

Great! I did not notice it before. Maybe we should add more tests for this function and replace FixedVector<bool> in Column.h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/compilation ci-passed dco-passed DCO check passed. kind/feature Issues related to feature request from users size/L Denotes a PR that changes 100-499 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants