-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement bottom #4161
Implement bottom #4161
Conversation
After the rework of the ordering for top, this was just a matter of adding a flag telling the minheap which way the values should be sorted.
@@ -1407,7 +1422,7 @@ func ReduceTop(values []interface{}, c *influxql.Call) interface{} { | |||
if whichselected == -1 { | |||
// none of the points have any values | |||
// so we can return what we have now | |||
sort.Sort(topReduceOut{out}) | |||
sort.Sort(topReduceOut{out, c.Name == "bottom"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should topReduceOut
-> topBottomReduceOut
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed that one.
One minor question, otherwise +1. Looks fantastic! |
Also, gofmt
+1, but this does need a CHANGELOG entry under features. |
resolve changelog conflict
After the rework of the ordering for top, this was just a matter
of adding a flag telling the minheap which way the values should
be sorted.