morrySnow commented on code in PR #32002:
URL: https://github.com/apache/doris/pull/32002#discussion_r1522399555


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PullUpCorrelatedFilterUnderApplyAggregateProject.java:
##########
@@ -57,27 +61,39 @@
  *                         child
  * </pre>
  */
-public class PullUpCorrelatedFilterUnderApplyAggregateProject extends 
OneRewriteRuleFactory {
+public class PullUpCorrelatedFilterUnderApplyAggregateProject implements 
RewriteRuleFactory {
     @Override
-    public Rule build() {
-        return logicalApply(any(), 
logicalAggregate(logicalProject(logicalFilter())))
-                .when(LogicalApply::isCorrelated).then(apply -> {
-                    LogicalAggregate<LogicalProject<LogicalFilter<Plan>>> agg 
= apply.right();
+    public List<Rule> buildRules() {
+        return ImmutableList.of(logicalApply(any(), logicalAggregate(
+                
logicalProject(logicalFilter()))).when(LogicalApply::isCorrelated).then(
+                        
PullUpCorrelatedFilterUnderApplyAggregateProject::pullUpCorrelatedFilter)
+                        
.toRule(RuleType.PULL_UP_CORRELATED_FILTER_UNDER_APPLY_AGGREGATE_PROJECT),

Review Comment:
   use different rule type for these two rules



-- 
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

Reply via email to