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

[C++] BitmapWriters clobber the first byte when length=0 #20769

Closed
asfimport opened this issue Jan 8, 2019 · 1 comment
Closed

[C++] BitmapWriters clobber the first byte when length=0 #20769

asfimport opened this issue Jan 8, 2019 · 1 comment
Assignees
Milestone

Comments

@asfimport
Copy link

When a BitmapWriter or FirstTimeBitmapWriter is constructed with length=0 then Finish() is invoked, the byte at start_offset / 8 is zeroed

The following change causes the test to fail:

--- a/cpp/src/arrow/util/bit-util-test.cc
+++ b/cpp/src/arrow/util/bit-util-test.cc
@@ -274,6 +274,10 @@ TEST(FirstTimeBitmapWriter, NormalOperation) {
         auto writer = internal::FirstTimeBitmapWriter(bitmap, 10, 3);
         WriteVectorToWriter(writer, {0, 0, 0});
       }
+      {
+        auto writer = internal::FirstTimeBitmapWriter(bitmap, 13, 0);
+        WriteVectorToWriter(writer, {});
+      }
       {
         auto writer = internal::FirstTimeBitmapWriter(bitmap, 13, 3);
         WriteVectorToWriter(writer, {1, 0, 1});

Reporter: Ben Kietzman / @bkietz
Assignee: Antoine Pitrou / @pitrou

PRs and other links:

Note: This issue was originally created as ARROW-4186. Please see the migration documentation for further details.

@asfimport
Copy link
Author

Wes McKinney / @wesm:
Issue resolved by pull request 3348
#3348

@asfimport asfimport added this to the 0.12.0 milestone Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants