Skip to content

Commit

Permalink
enhance: Check ANN field loaded in proxy (#36172)
Browse files Browse the repository at this point in the history
Related to #35415

Currently ANN field is loaded in Parital load is not performed in proxy,
this cause error message not clear and no error returned when collection
is empty

---------

Signed-off-by: Congqi Xia <[email protected]>
  • Loading branch information
congqixia authored Sep 11, 2024
1 parent e7ea1d7 commit 700a443
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/parser/planparserv2/plan_parser_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
"github.com/milvus-io/milvus/internal/proto/planpb"
"github.com/milvus-io/milvus/pkg/log"
"github.com/milvus-io/milvus/pkg/util/merr"
"github.com/milvus-io/milvus/pkg/util/typeutil"
)

Expand Down Expand Up @@ -124,6 +125,10 @@ func CreateSearchPlan(schema *typeutil.SchemaHelper, exprStr string, vectorField
log.Info("CreateSearchPlan failed", zap.Error(err))
return nil, err
}
// plan ok with schema, check ann field
if !schema.IsFieldLoaded(vectorField.GetFieldID()) {
return nil, merr.WrapErrParameterInvalidMsg("ann field \"%s\" not loaded", vectorFieldName)
}
fieldID := vectorField.FieldID
dataType := vectorField.DataType

Expand Down

0 comments on commit 700a443

Please sign in to comment.