[
https://issues.apache.org/jira/browse/CALCITE-1171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15213303#comment-15213303
]
Dan Di Spaltro commented on CALCITE-1171:
-----------------------------------------
I dug a little deeper and realized all the code is there, both on the parse and
the rel2sql side. It's basically the {{EnumerableRules.ENUMERABLE_LIMIT_RULE}}
rule is kicking in, and getting rid of the {{JdbcSortRule}}. Once I fixed the
JdbcSortRule to preserve first and offset, then I got rid of that rule. Now it
works, but I am curious why that happened in the first place, is it intended or
is there a reason I don't understand.
The cassandra sort helped me figure it out, so thanks to whoever made that
addition.
> Limit N on JdbcSchema pushdown doesn't seem to work
> ---------------------------------------------------
>
> Key: CALCITE-1171
> URL: https://issues.apache.org/jira/browse/CALCITE-1171
> Project: Calcite
> Issue Type: Bug
> Components: avatica, core
> Reporter: Dan Di Spaltro
> Assignee: Julian Hyde
> Priority: Minor
>
> I am exploring the code and came across this situation which I can't decide
> if it's intended or not. Programatically, I create a JdbcSchema on a Calcite
> driver connection, and then execute a single query. I have a breakpoint in
> the postgres driver, because I wanted to see how the queries end up before
> they're sent to PG. So I started simple, select * from X id = 'foo', which
> works great. Then I did a select * from X limit 10. And I noticed I was
> getting the correct number of rows back, but when sending to PG it would just
> send select * from X and then looks like the enumerable code (linq4j) would
> then chop off the results. Is there a way to change this behavior, or is
> this intended?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)