-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6391 from influxdata/js-5553-limit-queries-slow-w…
…ith-group-by Propagate the limit option to the low level iterators
- Loading branch information
Showing
6 changed files
with
269 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package tsm1 | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/influxdata/influxdb/influxql" | ||
) | ||
|
||
func newLimitIterator(input influxql.Iterator, opt influxql.IteratorOptions) influxql.Iterator { | ||
switch input := input.(type) { | ||
case influxql.FloatIterator: | ||
return newFloatLimitIterator(input, opt) | ||
case influxql.IntegerIterator: | ||
return newIntegerLimitIterator(input, opt) | ||
case influxql.StringIterator: | ||
return newStringLimitIterator(input, opt) | ||
case influxql.BooleanIterator: | ||
return newBooleanLimitIterator(input, opt) | ||
default: | ||
panic(fmt.Sprintf("unsupported limit iterator type: %T", input)) | ||
} | ||
} |