This is an automated email from the ASF dual-hosted git repository. zykkk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 839c44615ba [fix](build) Change the return type of `get_size` in `tablet_meta` for MacOS compatibility. (#41140) 839c44615ba is described below commit 839c44615ba1ca2774e8201b34f279d7674629e4 Author: zy-kkk <zhongy...@gmail.com> AuthorDate: Tue Sep 24 14:06:34 2024 +0800 [fix](build) Change the return type of `get_size` in `tablet_meta` for MacOS compatibility. (#41140) ``` auto size = tablet->tablet_meta()->delete_bitmap().get_size(); root.AddMember("size", size, root.GetAllocator()); ``` The compiler complains because there is an ambiguity in the call when passing size to the constructor of rapidjson::GenericValue. This is because the type of size (which may be size_t or unsigned long) is 64 bits on ARM64-based Macs (such as the M1 chip), and RapidJSON provides multiple possible matching constructors. --- be/src/olap/tablet_meta.cpp | 4 ++-- be/src/olap/tablet_meta.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/be/src/olap/tablet_meta.cpp b/be/src/olap/tablet_meta.cpp index a0d6213860c..6123dc61231 100644 --- a/be/src/olap/tablet_meta.cpp +++ b/be/src/olap/tablet_meta.cpp @@ -1092,9 +1092,9 @@ uint64_t DeleteBitmap::cardinality() const { return res; } -size_t DeleteBitmap::get_size() const { +uint64_t DeleteBitmap::get_size() const { std::shared_lock l(lock); - size_t charge = 0; + uint64_t charge = 0; for (auto& [k, v] : delete_bitmap) { charge += v.getSizeInBytes(); } diff --git a/be/src/olap/tablet_meta.h b/be/src/olap/tablet_meta.h index 9017e8baf32..a453baf745d 100644 --- a/be/src/olap/tablet_meta.h +++ b/be/src/olap/tablet_meta.h @@ -455,7 +455,7 @@ public: * return the total size of the Delete Bitmap(after serialized) */ - size_t get_size() const; + uint64_t get_size() const; /** * Sets the bitmap of specific segment, it's may be insertion or replacement --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org