EmmyMiao87 opened a new issue #7096: URL: https://github.com/apache/incubator-doris/issues/7096
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues. ### Description Transitive Closure 应用在 Doris 中主要指的是添加冗余 SQL 连接条件,通过冗余条件减少查询的数据量从而提升查询性能的一种 SQL 优化。 形式上,这称为传递闭包,即如果 a=b 和 a=1,则它遵循 b=1。 Doris 当前支持两个表之间的谓词传递,比如 a=b and a=1 。但他不支持多个表之间的传递。比如 a= b and b=c and a=1 这时,a=1 只能传递为 b=1 但是不能传递出 c=1。 ### Use case 举个例子 ``` select * from t1, t2, t3 where t1.id=t2.id and t2.id=t3.id and t3.id=1; ``` 上面这个查询他应该能传递出下面两个谓词 ``` t2.id = 1 t1.id = 1 ``` 则查询效果应该等同于 ``` select * from t1, t2, t3 where t1.id=t2.id and t2.id=t3.id and t3.id=1 and t2.id=1 and t1.id=1; ``` 这么做的好处在于当 filter predicate 传递给了其他表,他就可以提前过滤掉大量数据,从而提升查询性能。 ### Related issues _No response_ ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org