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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/PlanContext.java:
##########
@@ -57,6 +58,10 @@ public SessionVariable getSessionVariable() {
         return connectContext.getSessionVariable();
     }
 
+    public CostWeight getCostWeight() {
+        return getStatementContext().getCostWeight();

Review Comment:
   Fixed in 9c7aa04f314. Cost calculation now receives the CostWeight snapshot 
from the active CascadesContext/StatementContext and threads the same snapshot 
through memo ranking and enforcer accumulation, so it no longer rediscovers the 
weight through ConnectContext. I also restored the minidump replay context 
contract, enabled the previously disabled replay test, and updated its fixture 
to the current format. The targeted FE run passed all 28 tests across 
MinidumpUtTest, ChildrenPropertiesRegulatorTest, CostModelV1Test, SqlCacheTest, 
and OlapQueryCacheTest.



##########
fe/fe-core/src/main/java/org/apache/doris/common/cache/NereidsSqlCacheManager.java:
##########
@@ -262,6 +265,7 @@ public void tryAddBeCache(ConnectContext connectContext, 
String sql, CacheAnalyz
                 return;
             }
 
+            sqlCacheContext.setPhysicalPlan(physicalPlan.treeString());

Review Comment:
   Fixed in 9c7aa04f314. NereidsPlanner now renders and stores the SQL-cache 
physical plan inside the lock-protected planning callback. FE/BE cache 
insertion consumes that already captured string and no longer receives or 
renders a live PhysicalPlan after result delivery and table-lock release. The 
targeted FE run passed all 28 tests, including SqlCacheTest and 
OlapQueryCacheTest.



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