[ https://issues.apache.org/jira/browse/SOLR-8593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276480#comment-15276480 ]
Kevin Risden commented on SOLR-8593: ------------------------------------ Here is a blog post about the concepts and example rules: https://datapsyche.wordpress.com/2014/08/06/optiq-query-push-down-concepts/ I am pretty sure that Hive uses Calcite internally and that the implementation would be in that code base. Drill might also have the same join logic in their code base. {quote} Also do we have access to the SQL catalog and statistics from inside the rules engine. We'll need that information to decide which type of join to do. I guess we can make the catalog globally accessible if the rules API doesn't provide hooks into it. {quote} There is a computeSelfCost method that has access to the definition of: {code} public RelOptCost computeSelfCost(RelOptPlanner planner, RelMetadataQuery mq); {code} That should allow us to change which rules are fired based on different cost parameters. Also, the different rules can have different prerequisite states such that a filter is only allowed on a project or something similar. This should allow fine grained control of a join as well where the join will only fire if it is based on the sort of the same columns. > 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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org