Skip to content

Commit 8df8071

Browse files
committed
[fix](fe) Move stream scan normalization into CTE before-derive pipeline
### What problem does this PR solve? Issue Number: close apache#65339 Related PR: Problem Summary: Normalize stream scan rules were executed in a late CTE-related rewrite topic, which could be skipped in trees with CTE-related traversal constraints, causing delta/rewrite paths to miss synthetic change_type/version project aliases and fail when buildDmlFactorExpr accessed hidden stream columns. This moves into the early table/physical optimization topic after partition pruning and removes the separate late topic from , and updates regression baseline for to the fixed incremental result behavior. ### Release note None ### Check List (For Author) - Test: Regression test / Unit Test / Manual test / No need to test (with reason) - test_ivm_basic_mtmv (baseline .out updated) - Behavior changed: Yes (CTE stream-scan normalization now runs in the proper rewrite phase) - Does this need documentation: No
1 parent 6a2ec28 commit 8df8071

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

‎fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/executor/Rewriter.java‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -962,13 +962,6 @@ private static List<RewriteJob> getWholeTreeRewriteJobs(
962962
return rewriteJobs;
963963
}
964964
));
965-
if (Config.enable_table_stream) {
966-
builder.addAll(jobs(
967-
topic("normalize olap table stream scan after cte inline",
968-
topDown(new NormalizeOlapTableStreamScan())
969-
)
970-
));
971-
}
972965
return builder.build();
973966
}
974967

‎regression-test/data/mtmv_p0/ivm/test_ivm_basic_mtmv.out‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@
88
1 10 aaa
99
2 20 bbb
1010
3 30 ccc
11+
4 40 ddd
12+
5 50 eee
1113

1214
-- !after_third_refresh --
1315
1 10 aaa
14-
2 20 bbb
15-
3 30 ccc
16+
2 22 bbb_updated
17+
3 33 ccc_updated
18+
4 40 ddd
19+
5 50 eee
1620

1721
-- !after_complete_refresh --
1822
1 10 aaa
@@ -28,6 +32,7 @@
2832
-- !op_after_incremental --
2933
1 10 aaa
3034
2 20 bbb
35+
4 40 ddd
3136

3237
-- !op_after_restore --
3338
1 10 aaa
@@ -37,6 +42,7 @@
3742
-- !op_after_upsert_incremental --
3843
1 10 aaa
3944
2 20 bbb
45+
3 30 ccc
4046
4 40 ddd
4147

4248
-- !filter_after_complete --
@@ -46,6 +52,7 @@
4652
-- !filter_after_incremental --
4753
2 20
4854
4 40
55+
5 50
4956

5057
-- !filter_after_restore --
5158
2 20
@@ -54,6 +61,7 @@
5461

5562
-- !filter_after_upsert --
5663
2 20
64+
3 30
5765
4 40
5866
5 50
5967

0 commit comments

Comments
 (0)