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

TJ Banghart commented on CALCITE-1440:
--------------------------------------

Finally revisiting this with: https://github.com/apache/calcite/pull/4544

There’s not much there yet, just adding {{Combine}} as a {{RelNode}}. It might 
make sense to break this out into several separate issues, or continue working 
under [CALCITE-6188|https://issues.apache.org/jira/browse/CALCITE-6188]. 

For example, if Stamatis’s work discussed in the video linked above isn’t yet 
in Calcite, it may be better to first introduce a rule for subquery extraction 
within a single query, and then expand it to handle plans with a top-level 
{{Combine}}.

> Implement planner for converting multiple SQL statements to unified RelNode 
> Tree
> --------------------------------------------------------------------------------
>
>                 Key: CALCITE-1440
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1440
>             Project: Calcite
>          Issue Type: New Feature
>            Reporter: Chinmay Kolhatkar
>            Assignee: TJ Banghart
>            Priority: Major
>              Labels: pull-request-available
>
> This can be implemented as a separate planner or in {{VolcanoPlanner}} 
> itself. The planner should take multiple SQL statements as input and return a 
> unified {{RelNode}} tree.
> Example of above is as follows:
> {{SELECT COL1, COL2 FROM TABLE WHERE COL3 > 10;}}
> {{SELECT COL1, COL2 FROM TABLE WHERE COL4  = 'abc';}}
> The above 2 statements have a common path and hence can provide a unified 
> {{RelNode}} tree as follows:
> {noformat}
>  [Scan] -> [Project (COL1, COL2)] -> [Filter (COL4 = 'abc')] -> [Delta]
>                     |
>                     V
>             [Filter (COL3 > 10)]
>                     |
>                     v
>                  [Delta]
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to