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

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Problem Summary:
   
   Internally constructed MTMV refresh commands could lose their origin 
statement. Complete refreshes created a StatementContext without the MV query, 
while StmtExecutor copied a null LogicalPlanAdapter origin back into contexts 
that already had one.
   
   This change initializes complete-refresh contexts with the MV query and 
propagates the same OriginStatement to the LogicalPlanAdapter before executor 
construction. This preserves the originating SQL for planner and diagnostic 
paths and makes the MTMV command contract explicit.
   
   ### Release note
   
   Fix internal materialized view refresh planning to retain its originating 
SQL statement.
   
   ### Check List (For Author)
   
   - Test: Unit Test
     - ./run-fe-ut.sh --run 
org.apache.doris.nereids.trees.plans.commands.UpdateMvByPartitionCommandTest,org.apache.doris.mtmv.MTMVTaskTest
     - UpdateMvByPartitionCommandTest: 10 passed
     - MTMVTaskTest: 51 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