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

   ### What problem does this PR solve?
   
   Issue Number: close #65339
   
   Related PR:
   
   Problem Summary: Queries that place `LogicalOlapTableStreamScan` under a CTE 
can skip stream normalization in the old rewrite placement, so the stream 
virtual columns are still treated as scan outputs when later rules derive 
operative columns. That leaves hidden stream columns unresolved in the delta 
refresh path and can fail IVM incremental refresh planning. This PR carries two 
FE fixes into master: preserve `LogicalOlapTableStreamScan` during deep 
copy/CTE rewrite, and run `NormalizeOlapTableStreamScan` in the CTE children 
rewrite pipeline after partition pruning but before `OperativeColumnDerive`, so 
CTE and non-CTE paths both lower stream virtual columns into project aliases 
consistently.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test: Manual test / No need to test (with reason)
       - No additional test included in this master-only backport branch
   - Behavior changed: Yes (CTE stream-scan planning now normalizes in the 
correct rewrite phase)
   - 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