diff --git a/be/src/util/bitmap_value.h b/be/src/util/bitmap_value.h index 06a18f8bb4f6c0..dbdd1ff84c1aa5 100644 --- a/be/src/util/bitmap_value.h +++ b/be/src/util/bitmap_value.h @@ -1977,12 +1977,19 @@ class BitmapValue { ++src; uint8_t count = *src; ++src; - CHECK(count <= SET_TYPE_THRESHOLD) << "bitmap value with incorrect set count"; + if (count > SET_TYPE_THRESHOLD) { + throw Exception(ErrorCode::INTERNAL_ERROR, + "bitmap value with incorrect set count, count: {}", count); + } _set.reserve(count); for (uint8_t i = 0; i != count; ++i, src += sizeof(uint64_t)) { _set.insert(decode_fixed64_le(reinterpret_cast(src))); } - CHECK_EQ(count, _set.size()) << "bitmap value with incorrect set count"; + if (_set.size() != count) { + throw Exception(ErrorCode::INTERNAL_ERROR, + "bitmap value with incorrect set count, count: {}, set size: {}", + count, _set.size()); + } if (!config::enable_set_in_bitmap_value) { _prepare_bitmap_for_write();