mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-29 18:38:44 +08:00
6913283716
Signed-off-by: longjiquan <jiquan.long@zilliz.com>
24 lines
737 B
Go
24 lines
737 B
Go
package proxy
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
|
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
|
|
"github.com/milvus-io/milvus/internal/proto/internalpb"
|
|
"github.com/milvus-io/milvus/internal/proto/planpb"
|
|
)
|
|
|
|
type milvusReducer interface {
|
|
Reduce([]*internalpb.RetrieveResults) (*milvuspb.QueryResults, error)
|
|
}
|
|
|
|
func createMilvusReducer(ctx context.Context, params *queryParams, req *internalpb.RetrieveRequest, schema *schemapb.CollectionSchema, plan *planpb.PlanNode, collectionName string) milvusReducer {
|
|
if plan.GetQuery().GetIsCount() {
|
|
return &cntReducer{
|
|
collectionName: collectionName,
|
|
}
|
|
}
|
|
return newDefaultLimitReducer(ctx, params, req, schema, collectionName)
|
|
}
|