[fix](ut) fix some UT compile or run failed cases (#8489)
This commit is contained in:
@ -156,9 +156,16 @@ void read_from(const char** src, StringValue* result) {
|
||||
} // namespace detail
|
||||
|
||||
static StringVal serialize(FunctionContext* ctx, BitmapValue* value) {
|
||||
StringVal result(ctx, value->getSizeInBytes());
|
||||
value->write((char*)result.ptr);
|
||||
return result;
|
||||
if (!value) {
|
||||
BitmapValue empty_bitmap;
|
||||
StringVal result(ctx, empty_bitmap.getSizeInBytes());
|
||||
empty_bitmap.write((char*)result.ptr);
|
||||
return result;
|
||||
} else {
|
||||
StringVal result(ctx, value->getSizeInBytes());
|
||||
value->write((char*)result.ptr);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate the intersection of two or more bitmaps
|
||||
@ -1248,4 +1255,4 @@ template StringVal BitmapFunctions::orthogonal_bitmap_intersect_count_serialize<
|
||||
FunctionContext* ctx, const StringVal& src);
|
||||
template StringVal BitmapFunctions::orthogonal_bitmap_intersect_count_serialize<StringValue>(
|
||||
FunctionContext* ctx, const StringVal& src);
|
||||
} // namespace doris
|
||||
} // namespace doris
|
||||
|
||||
Reference in New Issue
Block a user