[
https://issues.apache.org/jira/browse/CALCITE-1440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18022311#comment-18022311
]
Julian Hyde commented on CALCITE-1440:
--------------------------------------
[~tjbanghart], Your PR looks good. No big surprises, but I am glad that you
focused on metadata, because now we take a Combine, transform it to another
Combine, and ask which is cheaper.
What would be the next step? I would love to get something that runs end-to-end
- a SQL query that you can execute and get results. What might be the form of
that query? Say a query that has two CTEs (represented as sub-queries the
Combine) that can be optimized to one that has only one CTE.
(Sorry it took me a while to review this.)
> 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)