jackwener commented on code in PR #11604: URL: https://github.com/apache/doris/pull/11604#discussion_r941047286
########## fe/fe-core/src/test/java/org/apache/doris/nereids/jobs/CostAndEnforcerJobTest.java: ########## @@ -55,60 +49,69 @@ public class CostAndEnforcerJobTest { * / \ * A B */ + + private static List<LogicalOlapScan> scans = Lists.newArrayList(); + private static List<List<SlotReference>> outputs = Lists.newArrayList(); + + @BeforeAll + public static void init() { + LogicalOlapScan scan1 = PlanConstructor.newLogicalOlapScan(0, "a", 0); + LogicalOlapScan scan2 = PlanConstructor.newLogicalOlapScan(1, "b", 1); + LogicalOlapScan scan3 = PlanConstructor.newLogicalOlapScan(2, "c", 0); + + scans.add(scan1); + scans.add(scan2); + scans.add(scan3); + + List<SlotReference> t1Output = scan1.getOutput().stream().map(slot -> (SlotReference) slot) + .collect(Collectors.toList()); + List<SlotReference> t2Output = scan2.getOutput().stream().map(slot -> (SlotReference) slot) + .collect(Collectors.toList()); + List<SlotReference> t3Output = scan3.getOutput().stream().map(slot -> (SlotReference) slot) + .collect(Collectors.toList()); + outputs.add(t1Output); + outputs.add(t2Output); + outputs.add(t3Output); + } + @Test - public void testExecute(@Mocked LogicalProperties logicalProperties) { + public void testExecute() { Review Comment: Clear this UT ########## fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/cascades/CostAndEnforcerJob.java: ########## @@ -66,18 +67,18 @@ public CostAndEnforcerJob(GroupExpression groupExpression, JobContext context) { this.groupExpression = groupExpression; } - @Override - public void execute() { - for (Group childGroup : groupExpression.children()) { - if (!childGroup.isHasCost()) { - // TODO: interim solution - pushTask(new CostAndEnforcerJob(this.groupExpression, context)); - pushTask(new OptimizeGroupJob(childGroup, context)); - childGroup.setHasCost(true); - return; - } - } - } + // @Override Review Comment: Should remove these code. -- 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