mirror of https://github.com/milvus-io/milvus.git
fix: [2.5] avoid panic when field not exists in schema in query node (#40542)
ref https://github.com/milvus-io/milvus/issues/40473 cherry-pick: https://github.com/milvus-io/milvus/pull/40541 --------- Signed-off-by: SpadeA <tangchenjie1210@gmail.com>pull/40626/head
parent
bcec7c5087
commit
ec6f8bac6d
|
@ -36,7 +36,10 @@ struct ExtractedPlanInfo {
|
|||
void
|
||||
add_involved_field(FieldId field_id) {
|
||||
auto pos = field_id.get() - START_USER_FIELDID;
|
||||
AssertInfo(pos >= 0, "invalid field id");
|
||||
AssertInfo(0 <= pos && pos < involved_fields_.size(),
|
||||
"invalid field id, field_id {}, schema size {}",
|
||||
field_id.get(),
|
||||
involved_fields_.size());
|
||||
involved_fields_.set(pos);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue