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

Wang Yanlin resolved CALCITE-3935.
----------------------------------
    Resolution: Fixed

Fixed in  
[https://github.com/apache/calcite/commit/a36f5a21f006ee717e7949269a99fa48a65f6abe.]
  thx  [~wojustme]

> Materialization-Failed, meeting to pull up bottom filter of Left/Right Join
> ---------------------------------------------------------------------------
>
>                 Key: CALCITE-3935
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3935
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Xurenhe
>            Assignee: Xurenhe
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: Jietu20200417-200532.png
>
>          Time Spent: 3h 20m
>  Remaining Estimate: 0h
>
> Hi all.
> `SubstitutionVisitor` support more join_type in some rules of `Join`.
> Now `SubstitutionVisitor` only support join type of `INNER`, when pulling up 
> bottom filters of join.
> It doesn't work as follows. 
> {code:java}
> @Test public void testJoinOnLeftProjectWithFilterToJoin() {
>     String mv = ""
>         + "select \"emps\".\"empid\", \"depts\".\"name\", 
> \"emps\".\"salary\"\n" +
>         "from \"emps\"\n" +
>         "left join \"depts\"\n" +
>         "on \"emps\".\"deptno\" = \"depts\".\"deptno\"\n"
>         + "where \"emps\".\"empid\" > 10";
>     String query = ""
>         + "select \"emps\".\"empid\", \"depts\".\"name\", 
> \"emps\".\"salary\"\n" +
>         "from \"emps\"\n" +
>         "left join \"depts\"\n" +
>         "on \"emps\".\"deptno\" = \"depts\".\"deptno\"\n"
>         + "where \"emps\".\"empid\" > 40";
>     sql(mv, query).withOnlyBySubstitution(true).ok();
>   }
> {code}



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

Reply via email to