未验证 提交 8a239355 编写于 作者: B BossZou 提交者: GitHub

[skip ci] Fix mishards query result reduce error (#3256)

Signed-off-by: Nyinghao.zou <yinghao.zou@zilliz.com>
上级 43c272fd
......@@ -27,7 +27,8 @@ class ServiceHandler(milvus_pb2_grpc.MilvusServiceServicer):
self.max_workers = max_workers
def _reduce(self, source_ids, ids, source_diss, diss, k, reverse):
sort_f = lambda x, y: x >= y if reverse else lambda x, y: x <= y
sort_f = (lambda x, y: x >= y) if reverse else (lambda x, y: x <= y)
if sort_f(source_diss[k - 1], diss[0]):
return source_ids, source_diss
if sort_f(diss[k - 1], source_diss[0]):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册