englefly commented on code in PR #16927:
URL: https://github.com/apache/doris/pull/16927#discussion_r1121358454
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/logical/InApplyToJoin.java:
##########
@@ -45,22 +52,52 @@ public class InApplyToJoin extends OneRewriteRuleFactory {
@Override
public Rule build() {
return logicalApply().when(LogicalApply::isIn).then(apply -> {
- Expression predicate;
+ if (needBitmapUnoin(apply)) {
+ /*
+ select t1.k1 from bigtable t1 where t1.k1 in (select t2.k2
from bitmap_table t2);
+ =>
+ select t1.k1 from bigtable t1 where t1.k1 in (select
bitmap_union(k2) from bitmap_table t2);
+ =>
+ select t1.k1 from bigtable t1 left semi join (select
bitmap_union(k2) x from bitmap_table ) t2
+ on bitmap_contains(x, t1.k1);
Review Comment:
done
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]