Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance: Check ANN field loaded in proxy #36172

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
"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 @@
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)

Check warning on line 130 in internal/parser/planparserv2/plan_parser_v2.go

View check run for this annotation

Codecov / codecov/patch

internal/parser/planparserv2/plan_parser_v2.go#L130

Added line #L130 was not covered by tests
}
fieldID := vectorField.FieldID
dataType := vectorField.DataType

Expand Down
Loading