[
https://issues.apache.org/jira/browse/SOLR-8593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15849154#comment-15849154
]
Joel Bernstein commented on SOLR-8593:
--------------------------------------
I've been reviewing CALCITE-1235 which deals with pushing down the LIMIT in the
Cassandra adapter.
The problem that is reported is:
bq. To clarify, in the currently committed version of the adapter, pushing down
sort + limit does not work because CassandraSortRule only ever seems to see a
Sort without a fetch.
I'm seeing a slightly different problem which is that the SolrSort isn't in the
logical parse tree if the ORDER BY clause is removed. Without the SolrSort we
don't have a way of getting the limit.
The way this is handled in CALCITE-1235 is to create a rule that fires on
EnumerableLimit. It seems to have worked as the ticket is committed. If we
don't see another approach we'll have to go that route as well.
> Integrate Apache Calcite into the SQLHandler
> --------------------------------------------
>
> Key: SOLR-8593
> URL: https://issues.apache.org/jira/browse/SOLR-8593
> Project: Solr
> Issue Type: Improvement
> Components: Parallel SQL
> Reporter: Joel Bernstein
> Assignee: Joel Bernstein
> Fix For: 6.5, master (7.0)
>
> Attachments: SOLR-8593.patch, SOLR-8593.patch, SOLR-8593.patch
>
>
> The Presto SQL Parser was perfect for phase one of the SQLHandler. It was
> nicely split off from the larger Presto project and it did everything that
> was needed for the initial implementation.
> Phase two of the SQL work though will require an optimizer. Here is where
> Apache Calcite comes into play. It has a battle tested cost based optimizer
> and has been integrated into Apache Drill and Hive.
> This work can begin in trunk following the 6.0 release. The final query plans
> will continue to be translated to Streaming API objects (TupleStreams), so
> continued work on the JDBC driver should plug in nicely with the Calcite work.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]