[ 
https://issues.apache.org/jira/browse/CALCITE-3806?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julian Hyde closed CALCITE-3806.
--------------------------------
    Resolution: Invalid

Closing as "invalid" because this is a question, not a bug or a feature 
request. It's a good question, but please ask it on the dev list.

> How to optimize repeated RelNode Structures ?
> ---------------------------------------------
>
>                 Key: CALCITE-3806
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3806
>             Project: Calcite
>          Issue Type: Wish
>          Components: core
>            Reporter: anjali shrishrimal
>            Priority: Minor
>
> Let's say input structure looks like this :
> {noformat}
> LogicalUnion(all=[true])
>   LogicalProject(EMPNO=[$0])
>     LogicalFilter(condition=[>=($0, 7369)])
>       LogicalTableScan(table=[[scott, EMP]])
>   LogicalProject(EMPNO=[$0])
>     LogicalFilter(condition=[>=($0, 7369)])
>       LogicalTableScan(table=[[scott, EMP]]){noformat}
>  
> In this case,
> {noformat}
>   LogicalProject(EMPNO=[$0])
>     LogicalFilter(condition=[>=($0, 7369)])
>       LogicalTableScan(table=[[scott, EMP]]){noformat}
> is repeated. It is going to fetch same data twice.
> Can we save one fetch? Can we somehow tell 2nd input of union to make use of 
> union's 1st input. Is there any way to express that in plan?
>  
> Also,
> If the structure was like this :
> {noformat}
> LogicalUnion(all=[true])
>   LogicalProject(EMPNO=[$0])
>     LogicalFilter(condition=[>=($0, 7369)])
>       LogicalTableScan(table=[[scott, EMP]])
>   LogicalProject(EMPNO=[$0])
>     LogicalFilter(condition=[>=($0, 8000)])
>       LogicalTableScan(table=[[scott, EMP]]){noformat}
> Second part of union can perform filtering on fetched data of 1st part. (As 
> second's output is subset of first's output)
>  
> Does calcite provide such kind of optimizations ?
> If not, what are the challenges to do so?
>  
>  
> I would appreciate some comments on this. Thank you.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to