cambyzju commented on code in PR #19973: URL: https://github.com/apache/doris/pull/19973#discussion_r1205125340
########## be/src/util/bitmap_value.h: ########## @@ -1959,16 +2511,31 @@ class BitmapValue { _is_shared = false; } + void _convert_to_bitmap_if_need() { + if (_type != SET || _set.size() <= SET_TYPE_THRESHOLD) { + return; + } + _prepare_bitmap_for_write(); + for (auto v : _set) { + _bitmap->add(v); + } + _type = BITMAP; + _set.clear(); + } + enum BitmapDataType { EMPTY = 0, SINGLE = 1, // single element - BITMAP = 2 // more than one elements + SET = 2, // elements count less or equal than 32 Review Comment: could we keep `BITMAP = 2` and add `SET = 3` ? -- 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. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org