Skip to content

SortCollapseRule for collapsing nested sorts.#410

Closed
gianm wants to merge 3 commits intoapache:masterfrom
gianm:sort-collapse-rule
Closed

SortCollapseRule for collapsing nested sorts.#410
gianm wants to merge 3 commits intoapache:masterfrom
gianm:sort-collapse-rule

Conversation

@gianm
Copy link
Contributor

@gianm gianm commented Mar 21, 2017

Useful for subqueries like SELECT * FROM (...) LIMIT X, where the inner
query might have an order by or limit.

Useful for subqueries like SELECT * FROM (...) LIMIT X, where the inner
query might have an order by or limit.
@gianm
Copy link
Contributor Author

gianm commented Mar 21, 2017

A test that seems unrelated failed on jdk8: https://travis-ci.org/apache/calcite/builds/213303516

Failed tests: 
  CalciteRemoteDriverTest.testRemoteExecuteMaxRow:495 
Expected: <2>
     but: was <0>

@gianm gianm closed this Mar 22, 2017
@gianm gianm reopened this Mar 22, 2017
Copy link
Contributor

@jcamachor jcamachor left a comment

Choose a reason for hiding this comment

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

We have a similar rule in Hive that I just realized that we never ported back to Calcite. New rule LGTM, it seems to have the same four different cases: https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveSortMergeRule.java

julianhyde added a commit to julianhyde/calcite that referenced this pull request Mar 30, 2017
julianhyde added a commit to julianhyde/calcite that referenced this pull request Mar 30, 2017
@gianm
Copy link
Contributor Author

gianm commented Apr 10, 2017

Fixed a bug with preservation of asc/desc ordering, and added a test for that.

@gianm
Copy link
Contributor Author

gianm commented Apr 25, 2017

Closing as discussed in https://issues.apache.org/jira/browse/CALCITE-1719.

@gianm gianm closed this Apr 25, 2017
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.

2 participants