You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "xiedeyantu (via GitHub)" <gi...@apache.org> on 2025/05/31 01:32:23 UTC

Re: [PR] [CALCITE-7047] Improve Volcano planner selection of sort conversion rules [calcite]

xiedeyantu commented on code in PR #4404:
URL: https://github.com/apache/calcite/pull/4404#discussion_r2116970231


##########
core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableLimitSortRule.java:
##########
@@ -40,6 +40,9 @@ public EnumerableLimitSortRule(Config config) {
 
   @Override public void onMatch(RelOptRuleCall call) {
     final Sort sort = call.rel(0);
+    if (sort.fetch == null || sort.getSortExps().isEmpty()) {

Review Comment:
   This PR will generate an exception if the user only uses ElementerableLimitSortRule. I understand that ElementerableLimitSort should not be a replacement, similar to TopN in other databases. Or in other words, do we need to implement an ElementerableTopN? But I always feel that ElementerableTopN and ElementerableLimitSort are the same operator.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org

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