You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/07/24 17:06:41 UTC

[GitHub] [calcite] julianhyde commented on a change in pull request #2080: [CALCITE-3920] Improve ORDER BY computation in Enumerable convention by exploiting LIMIT

julianhyde commented on a change in pull request #2080:
URL: https://github.com/apache/calcite/pull/2080#discussion_r460179726



##########
File path: core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableLimitRule.java
##########
@@ -48,6 +48,9 @@
           sort.getCollation(),
           null,
           null);
+      if (input == null) {

Review comment:
       Re. `input == null`. It's over-defensive code. Remove it.
   
   I think there should be a dedicated rule that converts a `Sort` to an `EnumerableHeapTopNSort`. The rule that creates `EnumerableSort` + `EnumerableLimit` will also fire. Let them compete based on cost.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org