mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
incorrect handling of large topns
This commit is contained in:
parent
5ef4d6fa6b
commit
62a59f2bd1
1 changed files with 4 additions and 1 deletions
|
|
@ -194,7 +194,10 @@ func (e *Executor) executeTopN(ctx context.Context, db string, c *pql.Call, slic
|
|||
if x != nil {
|
||||
return nil, x
|
||||
}
|
||||
trimedlist = trimedlist[0:n]
|
||||
|
||||
if int(n) < len(trimedlist) {
|
||||
trimedlist = trimedlist[0:n]
|
||||
}
|
||||
return trimedlist, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue