lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joel Bernstein (JIRA)" <>
Subject [jira] [Commented] (SOLR-8593) Integrate Apache Calcite into the SQLHandler
Date Fri, 03 Feb 2017 17:15:51 GMT


Joel Bernstein commented on SOLR-8593:

I was able to get the SolrSort to be pushed down with no ORDER BY, by changing the SolrSort.computeSelfCost

public RelOptCost computeSelfCost(RelOptPlanner planner, RelMetadataQuery mq) {
    return planner.getCostFactory().makeZeroCost();

It originally was:

 public RelOptCost computeSelfCost(RelOptPlanner planner, RelMetadataQuery mq) {
    return super.computeSelfCost(planner, mq).multiplyBy(0.05);

[~julianhyde], it appears that the planner was finding a lower cost option before the computeSelfCost
was changed. Does it appear that this is a problem with how we were originally computing the
cost? Or does this appear to be a bug in the planner. If it's a bug in the planner I'll log
a ticket with the Calcite project.

In either case I think the problem with LIMIT being pushed down is solved for this ticket.
So I will move on and continue testing in preparation to commit.

> Integrate Apache Calcite into the SQLHandler
> --------------------------------------------
>                 Key: SOLR-8593
>                 URL:
>             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

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

View raw message