[Bugfix](MV) Fix insert negative value to table with bitmap_union MV will cause count distinct result incorrect (#13507)

This commit is contained in:
Zhengguo Yang
2022-10-21 16:07:31 +08:00
committed by GitHub
parent 847b80ebfa
commit 3e92f742bf
6 changed files with 133 additions and 19 deletions

View File

@ -108,11 +108,14 @@ struct ToBitmapWithCheck {
if (LIKELY(parse_result == StringParser::PARSE_SUCCESS)) {
res_data[i].add(int_value);
} else {
LOG(WARNING) << "The input: " << raw_str
<< " is not valid, to_bitmap only support bigint value from 0 to "
"18446744073709551615 currently";
return Status::InternalError(
"bitmap value must be in [0, 18446744073709551615)");
std::stringstream ss;
ss << "The input: " << std::string(raw_str, str_size)
<< " is not valid, to_bitmap only support bigint value from 0 to "
"18446744073709551615 currently, cannot create MV with to_bitmap on "
"column with negative values or cannot load negative values to column "
"with to_bitmap MV on it.";
LOG(WARNING) << ss.str();
return Status::InternalError(ss.str());
}
}
}