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

xiong duan resolved CALCITE-6870.
---------------------------------
    Fix Version/s: 1.39.0
       Resolution: Fixed

> The FilterToCalcRule/ProjectToCalcRule should not convert a Filter/Project to 
> Calc when it contains Subquery
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-6870
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6870
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: xiong duan
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.39.0
>
>
>  The unit test in RelOptRulesTest:
> {code:java}
> @Test void testFilterToCalc() {
>   final String sql = "select ename from emp where sal > all (select comm from 
> emp)";
>   sql(sql)
>       .withRule(CoreRules.FILTER_TO_CALC)
>       .checkUnchanged();
> } {code}
> Now the Calcite's SubQueryRemoveRule includes FILTER_SUB_QUERY_TO_CORRELATE、
> PROJECT_SUB_QUERY_TO_CORRELATE、JOIN_SUB_QUERY_TO_CORRELATE. 
> It doesn't have a CALC_SUB_QUERY_TO_CORRELATE. When the plan has CALC with 
> Subquery, then it can't be converted.



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

Reply via email to