yujun777 commented on code in PR #65468:
URL: https://github.com/apache/doris/pull/65468#discussion_r3570283004
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/executor/Rewriter.java:
##########
@@ -728,6 +727,9 @@ public class Rewriter extends AbstractBatchJobExecutor {
new
LogicalResultSinkToShortCircuitPointQuery(),
new PruneOlapScanPartition(),
new PruneEmptyPartition(),
+ // Stream lowering needs the pruned partitions
and must finish before
+ // OperativeColumnDerive treats stream virtual
columns as scan slots.
+ new NormalizeOlapTableStreamScan(),
Review Comment:
Fixed in `32a07b7`.
I added `NormalizeOlapTableStreamScan` into
`CTE_CHILDREN_REWRITE_JOBS_MV_REWRITE_USED`, so the temp plan recorded by
`RecordPlanForMvPreRewrite` is normalized before it is optimized in pre-MV
rewrite.
For coverage, I intentionally removed the earlier regression attempt instead
of keeping a weak signal. I evaluated a chosen-based regression, but it cannot
stably prove this internal temp-plan state: the relevant object is
`tmpPlanForMvRewrite` in `StatementContext`, which is not directly exposed in
current `.out` outputs, and MV chosen/not-chosen is not a reliable proxy for
this `stream + CTE + change_type` shape.
The new FE UT checks the recorded temp plans directly and fails if any
`LogicalOlapTableStreamScan` remains there.
--
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]