lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Risden (JIRA)" <>
Subject [jira] [Commented] (SOLR-8593) Integrate Apache Calcite into the SQLHandler
Date Mon, 21 Mar 2016 18:53:25 GMT


Kevin Risden commented on SOLR-8593:

[~joel.bernstein] - I took a much closer look at Calcite and the SOLR-7560 patch. I think
there can be a much simpler approach than implementing the parsing and catalog separately.
If a Calcite adaptor is built that enables Calcite to access Solr this would solve a lot of
problems at once potentially. Calcite has a local JDBC connection which you can just pass
in a SQL query and get back a result set. This local JDBC connection could be wrapped in a
stream and returned from the /sql handler. This would remove the need for the limit/having/etc
streams that currently exist. The logic for pushing down having/limit/etc would have to be
moved into how Calcite does the processing. This should make the SQL handler much simpler
since it would pass off much of the work its doing to Calcite. The downside to this approach
is that much of the logic would be Calcite specific and need to figure out exactly which hooks
to tie into.

> Integrate Apache Calcite into the SQLHandler
> --------------------------------------------
>                 Key: SOLR-8593
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Joel Bernstein
>             Fix For: master
> 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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message