diff --git a/be/src/util/bitmap_value.h b/be/src/util/bitmap_value.h index 71edf62a8adb117..07895ed5591ef9f 100644 --- a/be/src/util/bitmap_value.h +++ b/be/src/util/bitmap_value.h @@ -1259,10 +1259,9 @@ class BitmapValue { } static std::string empty_bitmap() { - static BitmapValue bitmap; - std::string buf; - buf.resize(bitmap.getSizeInBytes()); - bitmap.write_to(buf.data()); + std::string buf(sizeof(BitmapValue), 0); + BitmapValue* bitmap_value = reinterpret_cast(buf.data()); + bitmap_value->_type = EMPTY; return buf; }