xinyiZzz commented on a change in pull request #6917: URL: https://github.com/apache/incubator-doris/pull/6917#discussion_r739927720
########## File path: be/src/util/bitmap_value.h ########## @@ -1451,6 +1451,26 @@ class BitmapValue { } } + /** + * Return new set with specified range (not include the range_end) + */ + int64_t sub_range(const int64_t& range_start, const int64_t& range_end, BitmapValue* ret_bitmap) { + int64_t count = 0; + for (auto it = _bitmap.begin(); it != _bitmap.end(); ++it) { + if (*it < range_start) { + continue; + } + if (*it < range_end) { + ret_bitmap->add(*it); + ++count; + } else { + break; + } + } + return count; Review comment: If range_start is greater than bitmap max, count will be equal to 0, and finally an empty string will be output, whether to unified into "null" -- 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