From 06675c2f9c902e2b0c13e8ffb85acb9b054708ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Podg=C3=B3rski?= Date: Mon, 27 Apr 2020 12:43:15 +0200 Subject: [PATCH] GroupBy should terminate even if the last result is empty --- executor.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/executor.go b/executor.go index 1b466b1b6..1e030b828 100644 --- a/executor.go +++ b/executor.go @@ -3178,6 +3178,9 @@ func (gbi *groupByIterator) nextAtIdx(i int) { } if wrapped && i != 0 { gbi.nextAtIdx(i - 1) + if gbi.done { + return + } } if i == 0 && gbi.filter != nil { gbi.rows[i].row = nr.Intersect(gbi.filter)