morrySnow opened a new pull request, #68272:
URL: https://github.com/apache/doris/pull/68272

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: #68269
   
   Problem Summary:
   
   Internal MTMV refresh tasks could construct a StatementContext and 
LogicalPlanAdapter without an origin statement. StmtExecutor then copied the 
null adapter origin back into the context. If CBO candidate costing failed, 
CostBasedRewriteJob dereferenced that missing origin while logging and raised 
an unrelated NullPointerException.
   
   This change initializes refresh planning with the MV query, propagates the 
same origin through the adapter, and makes the CBO failure log tolerate 
internal contexts without an origin statement.
   
   ### Release note
   
   Fix internal materialized view refresh failures caused by a missing origin 
statement.
   
   ### Check List (For Author)
   
   - Test: Unit Test
     - ./run-fe-ut.sh --run 
org.apache.doris.mtmv.MTMVTaskTest,org.apache.doris.nereids.jobs.rewrite.CostBasedRewriteJobTest
     - 17 tests passed
   - Behavior changed: No
   - Does this need documentation: No


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