Skip to content

Fix Order By Desc #4809

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

Merged
merged 1 commit into from
Nov 16, 2015
Merged

Fix Order By Desc #4809

merged 1 commit into from
Nov 16, 2015

Conversation

corylanou
Copy link
Contributor

Used the heap.Interface to be able to support a Reverse interface on TagSetCursor when it is order by DESC

fixes #4235.

@corylanou
Copy link
Contributor Author

Current test output (broken as expected based on issue):

query:  select value from "power" ORDER BY time DESC
exp:    {"results":[{"series":[{"name":"power","columns":["time","value"],"values":[["2000-01-01T00:00:04Z",4],["2000-01-01T00:00:03Z",3],["2000-01-01T00:00:02Z",2],["2000-01-01T00:00:01Z",1]]}]}]}
actual: {"results":[{"series":[{"name":"power","columns":["time","value"],"values":[["2000-01-01T00:00:03Z",3],["2000-01-01T00:00:02Z",2],["2000-01-01T00:00:04Z",4],["2000-01-01T00:00:01Z",1]]}]}]}

@corylanou corylanou changed the title (WIP) Fix Order By Desc Fix Order By Desc Nov 16, 2015
@otoolep
Copy link
Contributor

otoolep commented Nov 16, 2015

Great change, a lovely example of interfaces. +1 on green.


func newPointHeap() *pointHeap {
func newPointHeap() heap.Interface {
Copy link
Contributor

Choose a reason for hiding this comment

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

Only thing you might prefer is that the "constructor" could be of the form newPointHeap(ascending bool).

corylanou added a commit that referenced this pull request Nov 16, 2015
@corylanou corylanou merged commit e08dfe1 into master Nov 16, 2015
@corylanou corylanou deleted the fix-4235 branch November 16, 2015 21:23
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.

[0.9.4.1] "ORDER BY DESC" doesn't properly order output
2 participants