fix: Check json nested path before validating data type (#43329)

issue: #43279

Signed-off-by: sunby <sunbingyi1992@gmail.com>
This commit is contained in:
Bingyi Sun 2025-07-21 10:30:54 +08:00 committed by GitHub
parent 69c8c2660b
commit 21e71f6eb2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -137,12 +137,14 @@ class SegmentSealed : public SegmentInternalInterface {
return path.substr(0, index.nested_path.length()) ==
index.nested_path;
}
if (index.nested_path != path) {
return false;
}
if (any_type) {
return true;
}
return index.nested_path == path &&
milvus::index::json::IsDataTypeSupported(
index.cast_type, data_type, is_json_contain);
return milvus::index::json::IsDataTypeSupported(
index.cast_type, data_type, is_json_contain);
});
return it != json_indices.end();
}