fix ObRbUtils::binary_format_convert returns error when input binary is empty
This commit is contained in:
parent
352082c2b5
commit
f0d6d59e69
@ -256,7 +256,9 @@ int ObRbUtils::binary_format_convert(ObIAllocator &allocator, const ObString &rb
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
ObRbBinType bin_type;
|
||||
if (OB_FAIL(check_get_bin_type(rb_bin, bin_type))) {
|
||||
if (rb_bin.empty()) {
|
||||
binary_str = rb_bin;
|
||||
} else if (OB_FAIL(check_get_bin_type(rb_bin, bin_type))) {
|
||||
LOG_WARN("invalid roaringbitmap binary string", K(ret));
|
||||
} else if (bin_type == ObRbBinType::BITMAP_32 || bin_type == ObRbBinType::BITMAP_64) {
|
||||
binary_str.assign_ptr(rb_bin.ptr(),rb_bin.length());
|
||||
|
Loading…
x
Reference in New Issue
Block a user