This is an automated email from the ASF dual-hosted git repository. yiguolei 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 01f00aad6f1 [Bug](bitmap) clear set when bitmap fastunion (#37816) 01f00aad6f1 is described below commit 01f00aad6f1194d976d9a817a6a864ffbba28db4 Author: Pxl <pxl...@qq.com> AuthorDate: Mon Jul 15 21:20:33 2024 +0800 [Bug](bitmap) clear set when bitmap fastunion (#37816) ## Proposed changes before:6 min 59.33 sec after :24.67 sec --- be/src/util/bitmap_value.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/be/src/util/bitmap_value.h b/be/src/util/bitmap_value.h index ac5e826e1fe..2d15ac99611 100644 --- a/be/src/util/bitmap_value.h +++ b/be/src/util/bitmap_value.h @@ -1252,8 +1252,7 @@ public: std::vector<const detail::Roaring64Map*> bitmaps; std::vector<uint64_t> single_values; std::vector<const SetContainer<uint64_t>*> sets; - for (int i = 0; i < values.size(); ++i) { - auto* value = values[i]; + for (const auto* value : values) { switch (value->_type) { case EMPTY: break; @@ -1280,7 +1279,9 @@ public: _bitmap->add(_sv); break; case BITMAP: - *_bitmap |= detail::Roaring64Map::fastunion(bitmaps.size(), bitmaps.data()); + for (const auto* bitmap : bitmaps) { + *_bitmap |= *bitmap; + } break; case SET: { *_bitmap = detail::Roaring64Map::fastunion(bitmaps.size(), bitmaps.data()); @@ -1315,6 +1316,7 @@ public: _bitmap->add(v); } _type = BITMAP; + _set.clear(); break; case SET: { break; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org