[ 
https://issues.apache.org/jira/browse/SOLR-8593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15616318#comment-15616318
 ] 

Kevin Risden commented on SOLR-8593:
------------------------------------

One thing that you may have to do to make the Solr server happy until Calcite 
1.11 gets released is put the solr-core jar in front of calcite-core on the 
classpath. They are alphabetical right now (I fixed by renaming solr-core to 
asolr-core). This is to make sure the CalciteConnectionProperty fixes goes in 
before the original version. Otherwise you get an abstract method error.

select count(distinct) ... might actually work right now with that patch. If it 
doesn't then comment out the rules in the static block in SolrRules. That 
should give the full power of just regular SQL on top of Solr. It wouldn't 
really push anything down but still the SQL works. (This should include joins)

You should be able to add/change the SolrRules to see what gets pushed down. 
The classes from the branch are the exact same as the code here: 
https://github.com/risdenk/solr-calcite-example The code there has some more 
tests that show the explain plan. It was easier for me to iterate on the 
implementation of the rules that way.

> Integrate Apache Calcite into the SQLHandler
> --------------------------------------------
>
>                 Key: SOLR-8593
>                 URL: https://issues.apache.org/jira/browse/SOLR-8593
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Joel Bernstein
>            Assignee: Joel Bernstein
>
> 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.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to