branch-2.1: [Bug](function)fix json_object function check null nums error as return bool #44321 (#44381)
Cherry-picked from #44321 Co-authored-by: zhangstar333 <zhangsida@selectdb.com>
This commit is contained in:
committed by
GitHub
parent
28d7e9f357
commit
92a0919e9c
@ -784,13 +784,13 @@ public:
|
||||
for (int i = 0; i < args; i += 2) {
|
||||
const auto* null_map = nullmaps[i];
|
||||
if (null_map) {
|
||||
const bool not_null_num =
|
||||
auto not_null_num =
|
||||
simd::count_zero_num((int8_t*)null_map->get_data().data(), size);
|
||||
if (not_null_num < size) {
|
||||
return Status::InternalError(
|
||||
"function {} can not input null value , JSON documents may not contain "
|
||||
"NULL member names.",
|
||||
name);
|
||||
"NULL member names. input size is {}:{}",
|
||||
name, size, not_null_num);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user