You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/05/11 12:05:23 UTC

[GitHub] [arrow] pitrou commented on a change in pull request #7134: ARROW-8745: [C++] Enhance Bitmap::ToString test for big-endian platforms

pitrou commented on a change in pull request #7134:
URL: https://github.com/apache/arrow/pull/7134#discussion_r422991045



##########
File path: cpp/src/arrow/util/bit_util_test.cc
##########
@@ -1241,14 +1241,17 @@ TEST(Bitmap, VisitPartialWords) {
 #endif  // ARROW_VALGRIND
 
 TEST(Bitmap, ToString) {
-  uint64_t bitmap_value = 0xCAAC;
-  uint8_t* bitmap = reinterpret_cast<uint8_t*>(&bitmap_value);
-  EXPECT_EQ(Bitmap(bitmap, /*bit_offset*/ 0, /*length=*/34).ToString(),
+  uint64_t bitmap_value = 0xCAAC, bitmap_storage = 0;

Review comment:
       Why not simply:
   ```c++
   uint8_t bitmap[8] = {0xAC, 0xCA, 0, 0, 0, 0, 0, 0};
   ```
   ?




----------------------------------------------------------------
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.

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