pitrou commented on code in PR #45869:
URL: https://github.com/apache/arrow/pull/45869#discussion_r2154132901


##########
cpp/src/arrow/util/bit_util_test.cc:
##########
@@ -1342,25 +1369,48 @@ class BitmapOp : public ::testing::Test {
                    const std::vector<int>& right_bits,
                    const std::vector<int>& result_bits) {
     std::shared_ptr<Buffer> left, right, out;
-    int64_t length;
+    int64_t length{0};
+    uint8_t *left_data, *right_data;
 
     for (int64_t left_offset : {0, 1, 3, 5, 7, 8, 13, 21, 38, 75, 120, 65536}) 
{
-      BitmapFromVector(left_bits, left_offset, &left, &length);
+      if (left_bits.size() > 0) {

Review Comment:
   I think this is putting too much logic in these test methods. I would 
suggest something else:
   1) test `OptionalBitmapAnd` with both non-null arguments like you do here
   2) have separate tests for when one or both of the arguments is null
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to