[
https://issues.apache.org/jira/browse/CALCITE-6873?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
xiong duan updated CALCITE-6873:
--------------------------------
Description:
According to the documentation of FilterProjectTransposeRule, when Correlation
is included in the Filter, it is not allowed to push the Filter pass to the
Project. However, when the filter condition contains a subquery with
Correlation, it is pushed down. This would result in incorrect column
references in the SubqueryRemoveRule.
Now in Calcite:
{code:java}
LogicalFilter(condition=[EXISTS({
LogicalFilter(condition=[AND(=($0, $cor0.empid), =($1, $cor0.name))])
LogicalProject(subset=[rel#227:RelSubset#1.NONE.[]], empid=[$0], name=[$2])
LogicalTableScan(subset=[rel#225:RelSubset#0.NONE.[]], table=[[hr, emps]])
})])
LogicalProject(subset=[rel#227:RelSubset#1.NONE.[]], empid=[$0], name=[$2])
LogicalTableScan(subset=[rel#225:RelSubset#0.NONE.[]], table=[[hr, emps]])
{code}
after will become :
was:According to the documentation of FilterProjectTransposeRule, when
Correlation is included in the Filter, it is not allowed to push the Filter
pass to the Project. However, when the filter condition contains a subquery
with Correlation, it is pushed down. This would result in incorrect column
references in the SubqueryRemoveRule.
> FilterProjectTransposeRule should not push the Filter past the Project when
> the Filter contains a Subquery with correlation
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: CALCITE-6873
> URL: https://issues.apache.org/jira/browse/CALCITE-6873
> Project: Calcite
> Issue Type: Bug
> Reporter: xiong duan
> Assignee: xiong duan
> Priority: Major
>
> According to the documentation of FilterProjectTransposeRule, when
> Correlation is included in the Filter, it is not allowed to push the Filter
> pass to the Project. However, when the filter condition contains a subquery
> with Correlation, it is pushed down. This would result in incorrect column
> references in the SubqueryRemoveRule.
> Now in Calcite:
> {code:java}
> LogicalFilter(condition=[EXISTS({
> LogicalFilter(condition=[AND(=($0, $cor0.empid), =($1, $cor0.name))])
> LogicalProject(subset=[rel#227:RelSubset#1.NONE.[]], empid=[$0], name=[$2])
> LogicalTableScan(subset=[rel#225:RelSubset#0.NONE.[]], table=[[hr, emps]])
> })])
> LogicalProject(subset=[rel#227:RelSubset#1.NONE.[]], empid=[$0], name=[$2])
> LogicalTableScan(subset=[rel#225:RelSubset#0.NONE.[]], table=[[hr,
> emps]]) {code}
> after will become :
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)