File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
fe/fe-core/src/main/java/org/apache/doris/nereids Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 163
163
import org .apache .doris .nereids .trees .plans .logical .LogicalOlapScan ;
164
164
import org .apache .doris .nereids .trees .plans .logical .LogicalSetOperation ;
165
165
import org .apache .doris .nereids .trees .plans .logical .LogicalTopN ;
166
+ import org .apache .doris .nereids .trees .plans .logical .LogicalUnion ;
166
167
import org .apache .doris .nereids .trees .plans .logical .LogicalWindow ;
167
168
168
169
import com .google .common .collect .ImmutableList ;
@@ -412,7 +413,9 @@ public class Rewriter extends AbstractBatchJobExecutor {
412
413
topDown (new EliminateJoinByUnique ())
413
414
),
414
415
topic ("eliminate Aggregate according to fd items" ,
415
- cascadesContext -> cascadesContext .rewritePlanContainsTypes (LogicalAggregate .class ),
416
+ cascadesContext -> cascadesContext .rewritePlanContainsTypes (LogicalAggregate .class )
417
+ || cascadesContext .rewritePlanContainsTypes (LogicalJoin .class )
418
+ || cascadesContext .rewritePlanContainsTypes (LogicalUnion .class ),
416
419
custom (RuleType .ELIMINATE_GROUP_BY_KEY_BY_UNIFORM , EliminateGroupByKeyByUniform ::new ),
417
420
topDown (new EliminateGroupByKey ()),
418
421
topDown (new PushDownAggThroughJoinOnPkFk ()),
Original file line number Diff line number Diff line change 22
22
import org .apache .doris .nereids .trees .expressions .Expression ;
23
23
import org .apache .doris .nereids .trees .expressions .Not ;
24
24
import org .apache .doris .nereids .trees .plans .Plan ;
25
- import org .apache .doris .nereids .trees .plans .algebra .Join ;
26
25
import org .apache .doris .nereids .trees .plans .logical .LogicalFilter ;
27
26
import org .apache .doris .nereids .util .ExpressionUtils ;
28
27
import org .apache .doris .nereids .util .PlanUtils ;
@@ -55,9 +54,6 @@ public Rule build() {
55
54
return true ;
56
55
})
57
56
.thenApply (ctx -> {
58
- if (!ctx .cascadesContext .getRewritePlan ().containsType (Join .class )) {
59
- return ctx .root ;
60
- }
61
57
LogicalFilter <Plan > filter = ctx .root ;
62
58
Set <Expression > predicates = filter .getConjuncts ();
63
59
Set <Expression > isNotNulls = ExpressionUtils .inferNotNull (predicates , ctx .cascadesContext );
You can’t perform that action at this time.
0 commit comments