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

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


The following commit(s) were added to refs/heads/main by this push:
     new b270be39 fix(realtime): avoid shared_ptr::unique for C++20 
compatibility (#482)
b270be39 is described below

commit b270be39c6342951e5c745212771043987514ed4
Author: Gang Wu <[email protected]>
AuthorDate: Fri Oct 30 21:45:14 2026 +0800

    fix(realtime): avoid shared_ptr::unique for C++20 compatibility (#482)
---
 src/paimon/core/realtime/arrow_deduplicate_realtime_store.cpp | 2 +-
 src/paimon/core/realtime/realtime_key_offset_index.cpp        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/paimon/core/realtime/arrow_deduplicate_realtime_store.cpp 
b/src/paimon/core/realtime/arrow_deduplicate_realtime_store.cpp
index 9d44f8e6..a1936815 100644
--- a/src/paimon/core/realtime/arrow_deduplicate_realtime_store.cpp
+++ b/src/paimon/core/realtime/arrow_deduplicate_realtime_store.cpp
@@ -283,7 +283,7 @@ ArrowDeduplicateRealtimeStore::AcquireKeyOffsetLookup() {
 }
 
 Status ArrowDeduplicateRealtimeStore::EnsureMutableDeletionBitmap() {
-    if (!pending_offset_deletions_.unique()) {
+    if (pending_offset_deletions_.use_count() != 1) {
         pending_offset_deletions_ = 
std::make_shared<RoaringBitmap64>(*pending_offset_deletions_);
     }
     return Status::OK();
diff --git a/src/paimon/core/realtime/realtime_key_offset_index.cpp 
b/src/paimon/core/realtime/realtime_key_offset_index.cpp
index c57a41fd..1a4a347b 100644
--- a/src/paimon/core/realtime/realtime_key_offset_index.cpp
+++ b/src/paimon/core/realtime/realtime_key_offset_index.cpp
@@ -64,7 +64,7 @@ Result<std::vector<uint64_t>> MutableKeyOffsetIndex::HashKeys(
 }
 
 Status MutableKeyOffsetIndex::EnsureMutable() {
-    if (offsets_.unique()) {
+    if (offsets_.use_count() == 1) {
         return Status::OK();
     }
     PAIMON_ASSIGN_OR_RAISE(

Reply via email to