forked from apache/doris
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix](Nereids) Fix problem of infer predicates not completely (apache…
…#22145) Problem: When inferring predicate in nereids, new inferred predicates can not be the source of next round. For example: create table tt1(c1 int, c2 int) distributed by hash(c1) properties('replication_num'='1'); create table tt2(c1 int, c2 int) distributed by hash(c1) properties('replication_num'='1'); create table tt3(c1 int, c2 int) distributed by hash(c1) properties('replication_num'='1'); explain select * from tt1 left join tt2 on tt1.c1 = tt2.c1 left join tt3 on tt2.c1 = tt3.c1 where tt1.c1 = 123; we expect to get t33.c1 = 123, but we can just get t22.c1 = 123. Because when infer tt1.c1 = 123 and tt2.c1 = tt3.c1, we can not get any relationship of these two predicates. Solution: We need to cache middle results of source predicates like t22.c1 = 123 in example.
- Loading branch information
1 parent
a0463ea
commit 3c58e9b
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters