Github user lomoree commented on a diff in the pull request: https://github.com/apache/phoenix/pull/213#discussion_r81422631 --- Diff: phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixConverterRules.java --- @@ -232,8 +232,7 @@ public RelNode convert(RelNode rel) { private static Predicate<LogicalSort> HAS_FETCH = new Predicate<LogicalSort>() { @Override public boolean apply(LogicalSort input) { - return input.offset == null - && input.fetch != null; + return input.fetch != null; --- End diff -- With respect to my comment below, if there is a limit, then we apply the rule, otherwise we do not (regardless of offset). I may have the wrong idea here, but based on my understanding of offset, all of the test cases pass as expected. Are the test cases I have laid out in CalciteIT what you would expect?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---