-
Couldn't load subscription status.
- Fork 3.9k
GH-47825: [C++] Fix the issue that bitmap ops overriding partial leading byte #47912
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
base: main
Are you sure you want to change the base?
Conversation
cpp/src/arrow/util/bitmap_test.cc
Outdated
|
|
||
| namespace arrow::internal { | ||
|
|
||
| TEST(BitmapOpsTest, PartialLeadingByteSafety) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since CopyBitmap and others are tested in bit_util_test.cc, should we move those tests here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, saw the bunch of cases in bit_util_test.cc are actually about bitmap_ops.cc. Plus the bit_util_test.cc are already over 2500 LOC. Will do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved a bunch of existing "bitmap" related tests (1000+ lines) from bit_util_test.cc to the new bitmap_test.cc. Now the PR is big enough to review :)
cpp/src/arrow/util/CMakeLists.txt
Outdated
| SOURCES | ||
| align_util_test.cc | ||
| atfork_test.cc | ||
| bitmap_test.cc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would rather add this to bit-utility-test than to the already overcrowded utility-test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sounds right. Didn't see bit-utility-test is actually a collection of several test files. Will do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
|
@github-actions crossbow submit -g cpp |
|
Revision: 106c633 Submitted crossbow builds: ursacomputing/crossbow @ actions-4b57902598 |
|
@zanmato1984 In addition to the comments above, can you also rebase from git main? |
…test, and move bitmap tests from bit_util_test.cc into the new file
1b2efc8 to
37a41be
Compare
Thanks for looking. Rebased. |
|
@github-actions crossbow submit -g cpp |
|
Revision: 37a41be Submitted crossbow builds: ursacomputing/crossbow @ actions-cf05f6aa35 |
|
Would you take another look? @pitrou thanks. |
Rationale for this change
BitmapOpoverrides partial leading byte for unaligned offset.What changes are included in this PR?
Fix by properly handle the leading byte in the fast path of
BitmapOp.Are these changes tested?
Bitmap op UT included.
E2E test for
if_elsefunction execution incluced.Are there any user-facing changes?
None.
This PR contains a "Critical Fix". (If the changes fix either (a) a security vulnerability, (b) a bug that caused incorrect or invalid data to be produced, or (c) a bug that causes a crash (even when the API contract is upheld), please provide explanation. If not, you can remove this.)
if_elseemits wrong results for chunked inputs #47825