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:
github-actions[bot]
2024-11-22 23:51:33 +08:00
committed by GitHub
parent 28d7e9f357
commit 92a0919e9c
3 changed files with 9 additions and 3 deletions

View File

@ -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);
}
}
}