mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-05 05:18:52 +08:00
23 lines
694 B
Go
23 lines
694 B
Go
|
package proxy
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
"github.com/milvus-io/milvus/internal/proto/planpb"
|
||
|
|
||
|
"github.com/milvus-io/milvus-proto/go-api/milvuspb"
|
||
|
"github.com/milvus-io/milvus-proto/go-api/schemapb"
|
||
|
"github.com/milvus-io/milvus/internal/proto/internalpb"
|
||
|
)
|
||
|
|
||
|
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{}
|
||
|
}
|
||
|
return newDefaultLimitReducer(ctx, params, req, schema, collectionName)
|
||
|
}
|