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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/properties/ChildrenPropertiesRegulator.java:
##########
@@ -994,8 +994,7 @@ private void updateChildEnforceAndCost(GroupExpression 
child, PhysicalProperties
         ConnectContext connectContext = 
jobContext.getCascadesContext().getConnectContext();
         Cost enforceCost = CostCalculator.calculateCost(connectContext, 
enforcer, Lists.newArrayList(childOutput));
         enforcer.setCost(enforceCost);
-        Cost totalCost = CostCalculator.addChildCost(
-                connectContext, enforcer.getPlan(), enforceCost, currentCost, 
0);
+        Cost totalCost = enforceCost.add(currentCost, 
connectContext.getStatementContext().getCostWeight());

Review Comment:
   Fixed in d4aa2f6ce70. `ChildrenPropertiesRegulatorTest` now installs a real 
`ConnectContext` with an active `StatementContext` and exposes it through the 
mocked `CascadesContext`, restoring the cost-weight lookup contract used by the 
regulator. The exact test class now passes 8/8.



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

Reply via email to