doris
doris copied to clipboard
[Feat](nereids) support pull up predicate from set operator
This pr complete the support scope of PullUpPredicate: select a,b from test1 where a<1 union all select a,b from test2 where a<1; pull up filter a<1 select a,b from test1 where a<1 intersect all select a,b from test2 where b<1; pull up filter a<1 and b<1 select a,b from test1 where a<1 except all select a,b from test2 where b<1; pull up filter a<1 select 1 a, 'bbb' b union (all) select 2,'aa'; pull up filter a in(1,2) and b in ('bbb','aa') And support infer predicate for except and intersect: select a,b from test1 where a<1 except all select a,b from test2 where b<1; -> select a,b from test1 where a<1 except all select a,b from test2 where b<1 and a<1; select a,b from test1 where a<1 intersect all select a,b from test2 where b<1; -> select a,b from test1 where a<1 and b < 1 intersect all select a,b from test2 where b<1 and a < 1;