zstan commented on code in PR #13464:
URL: https://github.com/apache/ignite/pull/13464#discussion_r3772620122


##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rule/SortConverterRule.java:
##########
@@ -101,4 +113,44 @@ public interface Config extends RelRule.Config {
             call.transformTo(new IgniteSort(cluster, outTraits, input, 
sort.getCollation(), false));
         }
     }
+
+    /** Returns {@code true} if FETCH can be safely pushed to the sort. */
+    private static boolean canPushLimit(Sort sort) {
+        RexNode fetch = sort.fetch;
+
+        // A non-deterministic FETCH must be evaluated only once by the outer 
IgniteLimit.
+        if (!RexUtil.isDeterministic(fetch))
+            return false;
+
+        if (!RexUtil.isConstant(fetch) || containsDynamicParameter(fetch))

Review Comment:
   wht you wan\'`t  push down dyn param ? it differs from previous behavior 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to