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

Kevin Risden edited comment on SOLR-8593 at 3/22/16 6:08 PM:
-------------------------------------------------------------

Here is a separate approach that uses all of Calcite and the JDBCStream: 
https://github.com/risdenk/lucene-solr/compare/master...risdenk:calcite-sql-handler

It removes all the custom processing from SQLHandler, wraps Calcite in a 
JDBCStream, and executes the query.

There is something I learned about TestSQLHandler that I'm not sure is correct:
* quoted identifiers - like 'id' and 'text' aren't valid? These shouldn't be 
referring to columns?

Things to be explored with this approach:
* switch from a standard query in SolrEnumerator to a stream
* fix data types
* optimize cases like where
* code cleanup since it was just thrown together as a POC


was (Author: risdenk):
Here is a separate approach that uses all of Calcite and the JDBCStream: 
https://github.com/risdenk/lucene-solr/compare/master...risdenk:calcite-sql-handler

It removes all the custom processing from SQLHandler, wraps Calcite in a 
JDBCStream, and executes the query.

There is something I learned about TestSQLHandler that I'm not sure is correct:
* quoted identifiers - like 'id' and 'text' aren't valid? These shouldn't be 
referring to columns?

Things to be explored with this approach:
* switch from a standard query in SolrEnumerator to a stream
* fix data types
* optimize cases like where

> 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
>             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
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to