From 5ef4d6fa6bd156a37576e228e3784e2b9153bb0f Mon Sep 17 00:00:00 2001 From: Todd Gruben Date: Mon, 27 Feb 2017 19:34:33 -0600 Subject: [PATCH] adjusted first phase topn to collect all slices id's --- executor.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/executor.go b/executor.go index c681495f7..72df37c80 100644 --- a/executor.go +++ b/executor.go @@ -199,7 +199,7 @@ func (e *Executor) executeTopN(ctx context.Context, db string, c *pql.Call, slic } func (e *Executor) executeTopNSlices(ctx context.Context, db string, c *pql.Call, slices []uint64, opt *ExecOptions) ([]Pair, error) { - n, _ := c.Args["n"].(uint64) + //n, _ := c.Args["n"].(uint64) // Execute calls in bulk on each remote node and merge. mapFn := func(slice uint64) (interface{}, error) { @@ -222,9 +222,9 @@ func (e *Executor) executeTopNSlices(ctx context.Context, db string, c *pql.Call sort.Sort(Pairs(results)) // Only keep the top n after sorting. - if n > 0 && len(results) > int(n) { - results = results[0:n] - } + // if n > 0 && len(results) > int(n) { + // results = results[0:n] + //} return results, nil }