[ https://issues.apache.org/jira/browse/FLINK-32679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17748235#comment-17748235 ]
Benchao Li commented on FLINK-32679: ------------------------------------ {{FilterJoinRule}} is supposed to push filters below {{Join}} for inner join, Flink extends Calcite's {{FilterJoinRule}} to {{FlinkFilterJoinRule}} to do more things. If there is anything happens in original {{FilterJoinRule}}, but not in {{FlinkFilterJoinRule}}, I think we should improve it. > Filter conditions cannot be pushed to JOIN in some case > ------------------------------------------------------- > > Key: FLINK-32679 > URL: https://issues.apache.org/jira/browse/FLINK-32679 > Project: Flink > Issue Type: Improvement > Components: Table SQL / Planner > Reporter: grandfisher > Priority: Major > > There is a case > {code:java} > SELECT a.id, b.id, c.id, d.id, e.id > , f.id > FROM `table-v1` a > INNER JOIN `table-v2` b ON a.id = b.id > INNER JOIN `table-v3` c ON b.id = c.id > INNER JOIN `table-v4` d ON c.id = d.id > INNER JOIN `table-v5` e ON d.id = e.id > INNER JOIN `table-v6` f ON a.id = f.id > WHERE f.id = 0 > {code} > In this sql, each table should have a condition {*}id=0{*}, but actually only > table *f* and *a* has this condition. -- This message was sent by Atlassian Jira (v8.20.10#820010)