Skip to content
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

Merged
merged 4 commits into from
Sep 21, 2015
Merged

Implement bottom #4161

merged 4 commits into from
Sep 21, 2015

Conversation

DanielMorsing
Copy link
Contributor

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.

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"})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should topReduceOut -> topBottomReduceOut?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed that one.

@corylanou
Copy link
Contributor

One minor question, otherwise +1. Looks fantastic!

Also, gofmt
@otoolep
Copy link
Contributor

otoolep commented Sep 18, 2015

+1, but this does need a CHANGELOG entry under features.

Daniel Morsing added 2 commits September 21, 2015 12:06
DanielMorsing added a commit that referenced this pull request Sep 21, 2015
@DanielMorsing DanielMorsing merged commit 49327f6 into master Sep 21, 2015
@otoolep otoolep deleted the bottom branch October 28, 2015 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants