Skip to content

Commit 8a23935

Browse files
authored
[skip ci] Fix mishards query result reduce error (#3256)
Signed-off-by: yinghao.zou <yinghao.zou@zilliz.com>
1 parent 43c272f commit 8a23935

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

shards/mishards/service_handler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ def __init__(self, tracer, router, max_workers=multiprocessing.cpu_count(), **kw
2727
self.max_workers = max_workers
2828

2929
def _reduce(self, source_ids, ids, source_diss, diss, k, reverse):
30-
sort_f = lambda x, y: x >= y if reverse else lambda x, y: x <= y
30+
sort_f = (lambda x, y: x >= y) if reverse else (lambda x, y: x <= y)
31+
3132
if sort_f(source_diss[k - 1], diss[0]):
3233
return source_ids, source_diss
3334
if sort_f(diss[k - 1], source_diss[0]):

0 commit comments

Comments
 (0)