mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
fix: Fix missing null or non-exist key in json index (#40336)
issue: #35528 --------- Signed-off-by: sunby <sunbingyi1992@gmail.com>
This commit is contained in:
parent
63a7c4570e
commit
be4d09561b
@ -36,6 +36,8 @@ JsonInvertedIndex<T>::build_index_for_json(
|
||||
auto json_column = static_cast<const Json*>(data->RawValue(i));
|
||||
if (this->schema_.nullable() && !data->is_valid(i)) {
|
||||
this->null_offset.push_back(i);
|
||||
this->wrapper_->template add_array_data<T>(
|
||||
nullptr, 0, offset++);
|
||||
continue;
|
||||
}
|
||||
value_result<GetType> res = json_column->at<GetType>(nested_path_);
|
||||
@ -45,7 +47,9 @@ JsonInvertedIndex<T>::build_index_for_json(
|
||||
err == simdjson::NO_SUCH_FIELD,
|
||||
"Failed to parse json, err: {}",
|
||||
err);
|
||||
offset++;
|
||||
this->null_offset.push_back(i);
|
||||
this->wrapper_->template add_array_data<T>(
|
||||
nullptr, 0, offset++);
|
||||
continue;
|
||||
}
|
||||
if constexpr (std::is_same_v<GetType, std::string_view>) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user