-
Notifications
You must be signed in to change notification settings - Fork 455
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[query] sort, topk, bottomk fixes for instant queries (#2792)
* fixes most of topk, bottomk ordered tests when instant queries are used * formatted some code and extracted instant logic into separate method * Changes after review. Small optimization in appendValuesInstant. * fixed imports. made valueAndMeta struct package private. * Optimized instant queries - now only single block will be created. OrderedFlush() now sorts the results instead popping them one by one. FloatHeap won't be created if it's not used. * improved how max series count is calculated * removed unused method * initial implementation * Fixes NaN issues with m3 queries for sort and topk/bottomk. FloatHeap now supports adding NaN values. Uncommented topk, bottomk and sort compatibility tests (now they pass). * Retain old KeepNans flag for non instant queries * Changes after code review. * Small cleanup. * Added copyright header to sort_test.go. equalsPairs now checks individual struct elements instead of their printed values. * better init * Removed Min() function in favour of using this logic inline. Used append in place when indices are not needed. Documented and extracted some comparison functions for better readability and clearness. * Updated doc comment
- Loading branch information
Showing
18 changed files
with
766 additions
and
133 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
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
Oops, something went wrong.