This is an automated email from the ASF dual-hosted git repository.

wgtmac pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-cpp.git


The following commit(s) were added to refs/heads/main by this push:
     new 274d1bbb chore: upgrade CRoaring to 4.7.1 (#1001)
274d1bbb is described below

commit 274d1bbb4f46114806dc6515b2493483b47b3702
Author: Manu Zhang <[email protected]>
AuthorDate: Mon Oct 12 09:57:09 2026 +0800

    chore: upgrade CRoaring to 4.7.1 (#1001)
    
    Include the upstream portable IO endian fix and check canonical
    little-endian bitmap bytes when serializing and reading.
    
    Preserve the fixture's embedded zeros and exact wire length while
    satisfying modernize-avoid-c-arrays.
---
 cmake_modules/IcebergThirdpartyToolchain.cmake   |  2 +-
 src/iceberg/test/roaring_position_bitmap_test.cc | 22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/cmake_modules/IcebergThirdpartyToolchain.cmake 
b/cmake_modules/IcebergThirdpartyToolchain.cmake
index 9e0d3d3f..ce834a68 100644
--- a/cmake_modules/IcebergThirdpartyToolchain.cmake
+++ b/cmake_modules/IcebergThirdpartyToolchain.cmake
@@ -422,7 +422,7 @@ function(resolve_croaring_dependency)
     set(CROARING_URL "$ENV{ICEBERG_CROARING_URL}")
   else()
     set(CROARING_URL
-        
"https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v4.4.3.tar.gz";)
+        
"https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v4.7.1.tar.gz";)
   endif()
 
   fetchcontent_declare(croaring
diff --git a/src/iceberg/test/roaring_position_bitmap_test.cc 
b/src/iceberg/test/roaring_position_bitmap_test.cc
index 51f401b1..8dd998ef 100644
--- a/src/iceberg/test/roaring_position_bitmap_test.cc
+++ b/src/iceberg/test/roaring_position_bitmap_test.cc
@@ -19,6 +19,7 @@
 
 #include "iceberg/deletes/roaring_position_bitmap.h"
 
+#include <array>
 #include <cstddef>
 #include <cstdint>
 #include <filesystem>
@@ -387,6 +388,27 @@ TEST(RoaringPositionBitmapTest, 
TestSerializeDeserializeRoundTrip) {
   AssertEqualContent(copy, {10L, 20L, (int64_t{1} << 32) | 30L});
 }
 
+TEST(RoaringPositionBitmapTest, TestPortableLittleEndianEncoding) {
+  // One bitmap with key 0 and an array container containing position 1.
+  // Check canonical wire bytes: a same-host round trip can hide endian errors.
+  constexpr auto kExpected = std::to_array(
+      "\x01\x00\x00\x00\x00\x00\x00\x00"            // Number of bitmaps.
+      "\x00\x00\x00\x00"                            // Bitmap key.
+      "\x3a\x30\x00\x00\x01\x00\x00\x00"            // Cookie and number of 
containers.
+      "\x00\x00\x00\x00\x10\x00\x00\x00\x01\x00");  // Array container.
+  const std::string expected(kExpected.data(), kExpected.size() - 1);
+
+  RoaringPositionBitmap bitmap;
+  bitmap.Add(1L);
+  auto serialized = bitmap.Serialize();
+  ASSERT_THAT(serialized, IsOk());
+  EXPECT_EQ(serialized.value(), expected);
+
+  auto deserialized = RoaringPositionBitmap::Deserialize(expected);
+  ASSERT_THAT(deserialized, IsOk());
+  AssertEqualContent(deserialized.value(), {1L});
+}
+
 TEST(RoaringPositionBitmapTest, TestCopyConstructor) {
   RoaringPositionBitmap bitmap;
   bitmap.Add(10L);

Reply via email to