Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
278 commits
Select commit Hold shift + click to select a range
f1abbe1
[fix](fe) Fix redundant guard and checkstyle in incremental MTMV sink…
yujun777 Mar 24, 2026
7cb715e
[refactor](fe) Rename IVM normalize MTMV rule
yujun777 Mar 26, 2026
a7bebe5
[test](fe) Update FE unit test expectations
yujun777 Mar 26, 2026
1c4aa65
[fix](fe) Reuse aggregate output alias slot for expression group keys
yujun777 Mar 26, 2026
97a0ce2
[fix](fe) Check translated output slot refs
yujun777 Mar 26, 2026
069d589
[fix](fe) Restore view alias rewrite guard for simpleColumnDefinitions
yujun777 Mar 26, 2026
556dbfe
[fix](fe) Preserve deferred TopN projected outputs
yujun777 Mar 27, 2026
d25c641
[fix](fe) Limit MTMV alias rewrite to incremental refresh
yujun777 Mar 27, 2026
b160cfb
[fix](fe) Create MTMV context before StatementContext in refresh
yujun777 Mar 27, 2026
6ce3ce8
[feature](fe) Add IVM aggregate normalization support
yujun777 Mar 31, 2026
9b95929
[refactor](fe) Rename IVM-prefixed classes to Ivm in mtmv/ivm package
yujun777 Mar 31, 2026
b1e3d65
[refactor](fe) Extract MTMV test cases from CreateTableCommandTest in…
yujun777 Mar 31, 2026
6f0ad5c
[refactor](fe) Split testConvertToPartitionTableInfo into four separa…
yujun777 Mar 31, 2026
6749f13
[improvement](fe) Propagate IvmNormalizeResult through delta rewrite …
yujun777 Apr 2, 2026
d172b45
[refactor](fe) Extract IvmDeltaStrategy interface and AbstractDeltaSt…
yujun777 Apr 2, 2026
c75d687
[test](fe) Add aggregate IMMV creation test cases in CreateMTMVComman…
yujun777 Apr 2, 2026
fa2da17
[feature](fe) Add IVM agg delta rewrite strategies
yujun777 Apr 7, 2026
1fba63d
[fix](fe) Reuse MOW hidden columns for IVM MTMV
yujun777 Apr 7, 2026
4f00393
[refactor](fe) Rename IVM fallback and delta bundle types
yujun777 Apr 8, 2026
e28393e
[fix](fe) Persist IVM identity in MTMV metadata
yujun777 Apr 8, 2026
570e0c4
[feature](fe) Support explicit REFRESH MATERIALIZED VIEW ... INCREMEN…
seawinde Apr 8, 2026
abe21d6
[fix](ivm) Ivm validate columns fix when create incremental mv (#3)
seawinde Apr 9, 2026
bfd9834
[refactor](fe) Rename MvNondeterministicFunctionCollector back to Non…
yujun777 Apr 10, 2026
1b145d7
[fix](fe) Hide physical UNIQUE KEY and row-id columns in SHOW CREATE …
seawinde Apr 10, 2026
08dbeca
[refactor](fe) Consolidate isIvmHiddenColumn into IvmUtil
yujun777 Apr 12, 2026
fb6a967
[fix](fe) Fix IVM row duplication by enforcing HASH distribution on r…
yujun777 Apr 12, 2026
b4f695d
[test](fe,regression) Add IVM distribution override UTs and DUP_KEYS …
yujun777 Apr 12, 2026
1c2511c
[fix](fe) Fix three IVM INCREMENTAL refresh bugs (null detail, null d…
yujun777 Apr 12, 2026
9feb2d4
[test](regression) Add scalar aggregate IVM regression test
yujun777 Apr 12, 2026
bff1712
[feature](fe) Add MIN/MAX aggregate support for IVM incremental refresh
yujun777 Apr 12, 2026
ea1cb80
(fe) Fix stale Javadoc, remove dead code, and enhance IVM MIN/MAX reg…
yujun777 Apr 13, 2026
c679665
[improvement](fe) IVM SHOW CREATE outputs DISTRIBUTED BY RANDOM inste…
yujun777 Apr 13, 2026
bf916e8
[doc](fe) Add IVM AGENTS.md with testing guidelines and development n…
yujun777 Apr 13, 2026
e1af6f5
[fix](fe) Fix NPE in MTMV refresh when definition SQL contains SET_VA…
yujun777 Apr 13, 2026
09a3d92
[feature](ivm) Derive dml_factor from binlog_op column and fix assert…
yujun777 Apr 13, 2026
6388c5d
[refactor](fe) Extract common methods from IvmAggDeltaStrategy and do…
yujun777 Apr 13, 2026
8289dba
[test](regression) add NULL value regression tests for IVM aggregation
yujun777 Apr 13, 2026
ded7150
[test](regression) Add IVM agg regression tests for group deletion, s…
yujun777 Apr 13, 2026
72787ab
[test](fe) Add IVM agg gap tests and fix AVG(DECIMAL) ClassCastException
yujun777 Apr 13, 2026
5340a63
move regression case to mtmv_p0/ivm
yujun777 Apr 13, 2026
94bfbd6
[fix](fe) Fix null group key row_id collision in IVM
yujun777 Apr 14, 2026
4a7a6c8
[improvement](fe) Support expression arguments in IVM aggregate funct…
yujun777 Apr 14, 2026
35ab064
[refactor](fe) Replace raw string keys with StateKey enum in IVM agg …
yujun777 Apr 14, 2026
08c7f83
[improvement](fe) Improve IVM MIN/MAX boundary failure diagnosis
yujun777 Apr 14, 2026
9afb464
[feature](fe) Support bare GROUP BY without aggregate functions in IVM
yujun777 Apr 14, 2026
1eab264
[test](regression) Add INCREMENTAL output assertions to IVM agg regre…
yujun777 Apr 14, 2026
73c1fe3
[doc](fe) Merge IVM regression test binlog_op guide into FE IVM AGENT…
yujun777 Apr 14, 2026
2738c24
[test](fe) Replace IVM FE unit tests with Mockito
yujun777 Apr 14, 2026
1608573
[fix](fe) Replace remaining JMockit usage with Mockito in IvmRefreshM…
yujun777 Apr 15, 2026
88a52fa
[refactor](fe) Remove redundant hidden IVM columns for COUNT/SUM/MIN/MAX
yujun777 Apr 15, 2026
34dc9ae
[refactor](fe) Merge COUNT_STAR/COUNT_EXPR into COUNT, replace StateK…
yujun777 Apr 15, 2026
4293c88
[fix](fe) Fix import issues after rebase onto upstream/master
yujun777 Apr 16, 2026
3f6cd21
[improvement](fe) Clean up COUNT branch and use isCountStar() for rob…
yujun777 Apr 16, 2026
7961992
[improvement](fe) Add MIN/MAX guard bypass when non-null count drops …
yujun777 Apr 16, 2026
548c443
Ivm pick create alter validation (#6)
seawinde Apr 16, 2026
952d02b
[improvement](fe) Clean up IVM normalize and alter refresh error mess…
yujun777 Apr 17, 2026
514a0c7
[feature](ivm) Implement multi-bundle delta plan generation (Steps 1-5)
yujun777 Apr 17, 2026
2324add
[feature](fe) Add runningIvmRefresh flag with editlog persistence and…
yujun777 Apr 17, 2026
4a8a221
[improvement](fe) Add IVM unit tests and fix TSO read failure handling
yujun777 Apr 18, 2026
dd0ba47
[feature](fe) Support IVM incremental refresh for INNER JOIN and CROS…
yujun777 Apr 19, 2026
15ea816
[improvement](fe) Reject window functions in IVM materialized views
yujun777 Apr 19, 2026
4d98901
[feature](fe) Support UNION ALL in IVM normalize and strategy phases
yujun777 Apr 19, 2026
2a83d18
[refactor](fe) Remove IvmDeltaCommandBundle wrapper class
yujun777 Apr 19, 2026
7621b6e
[test](fe) Fix IVM aggregate row-id determinism assertion
yujun777 Apr 27, 2026
0ac86d1
[refactor](fe) Rename IvmSimpleScanDeltaStrategy to IvmLinearDeltaStr…
yujun777 Apr 27, 2026
cacf925
[refactor](fe) Split MTMVTask.run() into focused helpers
yujun777 Apr 27, 2026
53afcf8
fix compile
yujun777 May 9, 2026
8386db1
[fix](fe) Persist IVM flag for auto MTMV creation
seawinde May 8, 2026
4078df5
[fix](fe) Record IVM binlog fallback reason
seawinde May 7, 2026
a674b9e
[refactor](fe) Simplify auto refresh query analysis
seawinde May 9, 2026
4e7d12c
[feature](fe) Support IVM left outer join delta refresh
yujun777 May 13, 2026
ea8e538
[improvement](fe) Optimize left outer join IVM nullable-side delta
yujun777 May 13, 2026
d945798
[fix](fe) Reset AUTO MTMV fallback analysis state (#12)
seawinde May 14, 2026
1f9bd39
[feature](fe) Add IVM refresh explain command
yujun777 May 14, 2026
0b96d8b
[feature](fe) Support explaining IVM refresh plans
yujun777 May 14, 2026
84f40d0
[chore](fe) Format explain refresh IVM command
yujun777 May 14, 2026
943843f
[improvement](fe) Support left outer join chain in IVM
yujun777 May 14, 2026
d759b4e
[improvement](fe) Support side-aware IVM outer join delta
yujun777 May 15, 2026
23934fd
[refactor](fe) Refactor IVM delta strategy context plumbing
yujun777 May 15, 2026
6bb0160
[refactor](fe) Refactor IVM delta rewrite handlers
yujun777 May 15, 2026
188115e
[refactor](fe) Refine IVM normalize union and outer join context hand…
yujun777 May 15, 2026
6d4b243
[fix](fe) Fix FE build after IVM rebase
yujun777 May 20, 2026
c1cc173
[feature](fe) Support IVM full outer join rewrite
yujun777 May 20, 2026
7d32ddc
[fix](fe) Avoid BE execution in MTMV refresh UT
yujun777 May 20, 2026
51c1d74
[refactor](fe) Simplify IVM outer join delta rewrite
yujun777 May 23, 2026
efec88a
[refactor](fe) Simplify null-side delta context parameters
yujun777 May 23, 2026
fcd85d6
[fix](fe) Allow agg IVM joins with nondeterministic child row id
yujun777 May 23, 2026
af1c5af
[refactor](fe) Simplify IVM project delta rewrite
yujun777 May 23, 2026
fde2fd6
[refactor](fe) Simplify IVM aggregate delta apply rewrite
yujun777 May 23, 2026
8b0ba61
[fix](fe) Fix IVM outer join delta style issues
yujun777 May 24, 2026
db35920
[refactor](fe) Simplify IVM outer join event output schema
yujun777 May 30, 2026
dbf6dc1
[refactor](fe) Refactor IVM aggregate function rewrite
yujun777 May 30, 2026
b76755e
[fix](fe) Mark IVM binlog broken on metadata data changes (#15)
seawinde Jun 3, 2026
9a664b3
[feature](fe) Add IVM layout signature validation (#13)
seawinde Jun 3, 2026
f65dd04
[refactor](fe) Move IVM join delta rewrite into join handler
yujun777 Jun 3, 2026
1e55b75
[feature](fe) Support IVM repeat delta rewrite
yujun777 Jun 4, 2026
19ae3a5
[feature](fe) Support IVM bitmap aggregates
yujun777 Jun 4, 2026
4fb37f7
[fix](fe) Fix IVM binlog mark during partition recovery
yujun777 Jun 4, 2026
d2be8ec
[test](fe) Fix physical translator projection test assertion
yujun777 Jun 4, 2026
bbc8d6b
[fix](regression) Exclude ivm suites from cloud p0 pipeline
yujun777 Jun 5, 2026
b1799db
[improvement](fe) Use 128-bit hash for IVM row id (#16)
seawinde Jun 8, 2026
b56f4e4
[fix](fe) Derive IVM binlog broken from DDL (#17)
seawinde Jun 11, 2026
ea4b92a
[feature](fe) Support MTMV refresh fallback strategy (#14)
seawinde Jun 12, 2026
f7189e7
fix: FE compilation and test failures after IVM refresh mode refactor
yujun777 Jun 12, 2026
939769a
refactor: remove passThroughSlots from Repeat operator
yujun777 Jun 12, 2026
52cdf74
fix: resolve constructor signature mismatch after upstream merge
yujun777 Jun 12, 2026
fd0899a
fix(fe): IVM delta rewrite fixes for dml_factor, min/max guard, and o…
yujun777 Jun 22, 2026
04dd418
fix: shorten base table names in IVM regression tests to avoid 64-cha…
yujun777 Jun 22, 2026
db7c199
fix(test): replace COMPLETE with INCREMENTAL in agg_outer_join_1 to a…
yujun777 Jun 22, 2026
6ecfdfb
fix(ivm): remove stream scan passthrough, fix outer join snapshot, ad…
yujun777 Jun 23, 2026
5afd66e
fix(ivm): support chained MTMV stream creation and normalize hidden k…
yujun777 Jun 25, 2026
5be7e63
refactor(ivm): merge per-table delta plans via UNION ALL into single …
yujun777 Jun 29, 2026
6f38f39
[fix](fe) Validate partitioned IVM MV keys and distribution (#19)
seawinde Jun 29, 2026
0909c3b
feat(ivm): propagate baseOp column and add binlog order FOJ rewrite
yujun777 Jul 2, 2026
f0f5ad7
fix compile
yujun777 Jul 3, 2026
a3df37a
[fix](fe) Rebuild IVM baseline after excluded trigger changes (#18)
seawinde Jul 3, 2026
041398e
[fix](fe) Fix FE sink binding compile mismatch
yujun777 Jul 3, 2026
d926c37
fix compile
yujun777 Jul 6, 2026
c8da977
[refactor](fe) Move IVM incremental refresh rewrite into analyzer
yujun777 Jul 3, 2026
1e966f1
[fix](fe) Keep IVM plan signature independent of sink roots
yujun777 Jul 4, 2026
035d63b
[fix](fe) Move IVM incremental refresh rewrite into Nereids
yujun777 Jul 7, 2026
a9e6d11
[fix](fe) Fix FE build break after IVM refresh refactor
yujun777 Jul 7, 2026
f015e33
[fix](fe) Support explain refresh complete for mtmv
yujun777 Jul 7, 2026
2024ac5
[refactor](fe) Rename IVM MTMV classes consistently
yujun777 Jul 7, 2026
177e7b0
[refactor](fe) Remove session-driven IVM normalize state
yujun777 Jul 7, 2026
55a9381
[fix](fe) Replace mock tso snapshots in IVM delta refresh
yujun777 Jul 8, 2026
4fd4696
[refactor](stream-scan) Replace isNormalized/isIncrementalScan fields…
yujun777 Jul 8, 2026
8ed250e
[feat](mtmv) Capture partition snapshots for IVM incremental refresh
yujun777 Jul 8, 2026
2ab775d
[fix](nereids) Preserve LogicalOlapTableStreamScan type in deep copy …
yujun777 Jul 8, 2026
d91046d
[fix](ivm) Fix IVM delta plan hidden column handling and plan signature
yujun777 Jul 8, 2026
224db91
[fix](ivm) Use TypeCoercionUtils for type casting in IVM aggregate pr…
yujun777 Jul 8, 2026
8689f6b
[refactor](ivm) Set completedPartitions and simplify snapshot scan co…
yujun777 Jul 9, 2026
54635fa
[refactor](mtmv) Build refresh context once and share across IVM/PART…
yujun777 Jul 9, 2026
5ccfd6a
[fix](fe) Fix IVM avg delta handling and test coverage
yujun777 Jul 10, 2026
43b25b8
[fix](fe) Fix IVM hidden column remap for snapshot rewrite
yujun777 Jul 10, 2026
8f08832
[fix](fe) Move stream scan normalization into CTE before-derive pipeline
yujun777 Jul 10, 2026
f32cb71
[fix](regression) Align ivm agg incremental cases with stream offsets
yujun777 Jul 10, 2026
0685613
[fix](fe) Reject mismatched project outputs in PullUpJoinFromUnionAll
yujun777 Jul 10, 2026
01ea7e3
[refactor](fe) Reuse ExplainCommand for MTMV refresh
yujun777 Jul 13, 2026
6ded646
[feature](fe) Support subquery aliases in IVM
yujun777 Jul 13, 2026
99910d5
[refactor](fe) Move IVM MTMV rules to analysis package
yujun777 Jul 14, 2026
f96b1b5
fix compile
yujun777 Jul 14, 2026
7206f6d
[test](fe) Fix stale IVM FE unit tests for stream refresh
yujun777 Jul 14, 2026
98e0c14
[fix](fe) Disable PullUpJoinFromUnionAll for MTMV tasks
yujun777 Jul 14, 2026
8b2f39d
[test](regression) Stabilize ivm explain refresh output
yujun777 Jul 14, 2026
55afdb2
[test](regression) Add temporary ivm stream offset mock check
yujun777 Jul 15, 2026
0d637c9
[test](regression) Fix ivm agg regression cases
yujun777 Jul 15, 2026
31ae9bc
[test](regression) Fix basic ivm mtmv refresh case
yujun777 Jul 15, 2026
c55a900
[fix](fe) Fix ExprId reuse in IVM inner join delta union
yujun777 Jul 15, 2026
4af9bd6
[test](regression) Update ivm union regression cases
yujun777 Jul 15, 2026
473e7d2
[test](regression) Update ivm repeat and bitmap agg cases
yujun777 Jul 15, 2026
032c0db
[fix](fe) Fix agg join slot binding in ivm delta rewrite
yujun777 Jul 15, 2026
734abf3
[test](regression) Update ivm outer join regression outputs
yujun777 Jul 15, 2026
e49ad0c
[test](regression) Update ivm subquery alias regressions
yujun777 Jul 15, 2026
f2b3205
[test](regression) Update ivm regression cases and comments
yujun777 Jul 15, 2026
c245e2a
[test](regression) Remove unused ivm load suite
yujun777 Jul 15, 2026
feb80f4
[test](regression) Re-enable chained IVM row-id regression
yujun777 Jul 16, 2026
c726423
[fix](fe) Track refreshed partitions in ivm task snapshot metadata
yujun777 Jul 16, 2026
e1a641c
[fix](fe) Handle empty non-null sum state in IVM refresh
yujun777 Jul 16, 2026
f47e1e3
[fix](fe) Fix ivm rewrite projection mapping with hidden columns
yujun777 Jul 16, 2026
9cad4f3
[fix](fe) Use sequence ordering for IVM stream refresh
yujun777 Jul 17, 2026
812cf99
[refactor](fe) Refactor IVM incremental refresh delta rewrite
yujun777 Jul 18, 2026
7d2bb0f
[fix](fe) Allow union all on outer join null side in IVM
yujun777 Jul 18, 2026
16e3485
[fix](fe) Preserve IVM fallback stream offsets (#23)
seawinde Jul 20, 2026
5741871
[fix](mtmv) Fix IVM row binlog schema mapping (#20)
seawinde Jul 20, 2026
0ba6258
[test](regression) Remove manual IVM stream offset advancement
yujun777 Jul 20, 2026
9cdb1af
[test](regression) Enable chained IVM materialized view regression
yujun777 Jul 20, 2026
8af6d83
[fix](fe) Mark IVM binlog broken after base table replace (#21)
seawinde Jul 20, 2026
9b9ea20
[fix](fe) Fix cross-database IVM stream lookup
yujun777 Jul 20, 2026
174a4e4
[fix](fe) Fix fast insert into values after IVM stream guard (#24)
seawinde Jul 20, 2026
02b5b15
[fix](fe) Reject reserved IVM output column names
yujun777 Jul 20, 2026
4411746
[test](regression) Cover IVM union delete from same base
yujun777 Jul 20, 2026
113358c
[fix](fe) Align decimal IVM AVG truncation
yujun777 Jul 21, 2026
8d4bf0b
[fix](fe) Route IVM failures through refresh fallback
yujun777 Jul 21, 2026
0231713
[fix](fe) Retry IVM execution and publish complete refresh signature
yujun777 Jul 21, 2026
3b0983a
[refactor](fe) Clarify MTMV refresh method names
yujun777 Jul 22, 2026
9b88101
[fix](fe) Clean up IVM streams after materialized view replacement (#25)
seawinde Jul 22, 2026
701771f
[feature](fe) Support all-stream IVM refresh explain plans
yujun777 Jul 23, 2026
b46a6dc
[fix](fe) Use qualified base table names for IVM streams (#26)
seawinde Jul 23, 2026
e054b12
remove mock advance_stream_offset
yujun777 Jul 23, 2026
0236a4b
[fix](fe) Record refresh query ID for MTMV tasks
yujun777 Jul 23, 2026
be4cf74
[fix](fe) Unify IVM refresh audit context
yujun777 Jul 23, 2026
a88f405
[test](regression) Cover IVM join update-delete binlog regression
yujun777 Jul 23, 2026
8f0c2bf
[refactor](fe) Unify MTMV compute group setup
yujun777 Jul 23, 2026
118bffe
[refactor](fe) Clarify incremental IVM refresh naming
yujun777 Jul 24, 2026
3eeb641
[refactor](fe) Use IvmException for IVM analysis failures
yujun777 Jul 24, 2026
69a46fb
[refactor](fe) Simplify IVM refresh execution helpers
yujun777 Jul 24, 2026
a5aac77
[fix](fe) Isolate IVM delta rewrite tests
yujun777 Jul 24, 2026
a00df50
[feature](fe) Support configurable nested IVM outer joins
yujun777 Jul 24, 2026
207e95e
[fix](fe) Retry IVM refresh after missing MV partition
yujun777 Jul 27, 2026
104aa4e
[fix](regression) Scope MTMV debug points by MV name
yujun777 Jul 28, 2026
a44eac1
[fix](fe) Remove IVM outer-join null-side restriction
yujun777 Jul 28, 2026
50e3da7
[feature](fe) Support OneRowRelation in IVM refresh
yujun777 Jul 29, 2026
37baf95
[fix](fe) Fix chained IVM refresh hidden column handling
yujun777 Jul 29, 2026
2c9611e
[fix](fe) Reject IVM MTMV based on non-IVM MTMV
yujun777 Jul 29, 2026
6f2b2d3
[fix](fe) Format IVM normalization log message
yujun777 Jul 30, 2026
559d21d
[test](regression) Add IVM full outer join residual update regression
yujun777 Jul 30, 2026
81cbd68
[feature](fe) Support typed IVM sequence encoding
yujun777 Jul 30, 2026
ed3b292
[fix](fe) Fix IVM refresh with hidden storage columns
yujun777 Jul 30, 2026
fb6a3ec
[fix](fe) Initialize statement context in OlapInsertExecutorTest
yujun777 Jul 31, 2026
1514e97
[fix](fe) Route OneRowRelation through linear delta handler
yujun777 Jul 31, 2026
d282c5a
[fix](fe) Preserve broken binlog fallback reason (#27)
seawinde Jul 31, 2026
67585dc
[fix](fe) Fix compile error after Repeat API change
yujun777 Aug 4, 2026
9c11bac
[test](regression) Add IVM CUBE grouping-key migration regression
yujun777 Aug 4, 2026
6b08d61
[test](regression) Add IVM sequence delta overwrite regression
yujun777 Aug 4, 2026
55b3ad5
[feature](fe) Add IVM incremental refresh dry-run command
yujun777 Aug 4, 2026
6ab3064
[fix](fe) Allow LIMIT 0 in IVM incremental refresh dry run
yujun777 Aug 5, 2026
ec7dde9
[fix](fe) Make IVM incremental refresh cancellation effective
yujun777 Aug 5, 2026
0c431a7
[fix](fe) Fix IVM COMPLETE refresh NPE from cleared executor field
yujun777 Aug 6, 2026
456bb20
Revert "[fix](fe) Disable PullUpJoinFromUnionAll for MTMV tasks"
yujun777 Aug 6, 2026
f6cd2f8
fix fe ut
yujun777 Aug 6, 2026
772976b
[feature](fe) Share IVM aggregate hidden state columns
yujun777 Aug 6, 2026
6153973
[fix](fe) Guard null planner in IVM COMPLETE refresh signature capture
yujun777 Aug 10, 2026
a64f696
[fix](fe) Reconcile IVM streams before complete refresh (#30)
seawinde Aug 10, 2026
80859d2
[fix](fe) Align IvmBinlogBrokenTest with new TruncateTableInfo signature
yujun777 Aug 10, 2026
ee0b76c
[feature](fe) Add ivm_use_full_keys property for IVM MOW MVs
yujun777 Aug 11, 2026
98308cc
[feature](fe) Pass through row-id and strip ancestor row-ids in IVM f…
yujun777 Aug 11, 2026
490c8a6
[refactor](fe) Rename DryRunLimit to IvmDryRunLimit
yujun777 Aug 11, 2026
2463d28
[feature](fe) Keep join-child base-table row-id as identity key in IV…
yujun777 Aug 12, 2026
4fb31e5
[feature](fe) Carry IVM MV row-id into join keys under ivm_use_full_keys
yujun777 Aug 12, 2026
63f3366
[fix](fe) Repair partition-level IVM baselines before refresh (#28)
seawinde Aug 14, 2026
36d2838
[fix](fe) Align MTMVTaskTest mock with two-arg getBaseVersions
yujun777 Aug 17, 2026
97df14b
Revert "[fix](regression) Exclude ivm suites from cloud p0 pipeline"
yujun777 Aug 17, 2026
445ca8b
(fe) Stabilize grouping function order in repeat
seawinde Aug 17, 2026
f0c2433
[fix](fe) Preserve stable group-by/output order in normalize rules fo…
yujun777 Aug 17, 2026
62c50d4
[fix](regression) Regenerate test_ivm_outer_join_3 expected output
yujun777 Aug 17, 2026
8ddc96a
[fix](fe) Reject invalid IVM refresh before partition sync (#32)
seawinde Aug 17, 2026
a5c3825
[fix](fe) Compose join row-id with null-side match flags for outer joins
yujun777 Aug 18, 2026
91f707c
[fix](fe) Allow nullable IVM row-id for single lossless key
yujun777 Aug 18, 2026
2e34ee4
[fix](fe) Validate IVM layout signature at normalize time for increme…
yujun777 Aug 18, 2026
6c27431
[fix](fe) Use any eligible MOW key type directly as IVM row-id instea…
yujun777 Aug 18, 2026
bf9b499
[refactor](fe) Rename scan row-id field and merge key slot collection…
yujun777 Aug 19, 2026
1b9bffb
[feature](fe) Add IvmStreams column to mv_infos for IVM base-table st…
yujun777 Aug 20, 2026
9dfcd65
[fix](fe) Fix compile issues after rebase onto upstream master
yujun777 Aug 25, 2026
f378d2f
[fix](fe) Fix outdated alias case expectation in CreateViewTest
yujun777 Aug 25, 2026
bc6247b
[test](regression) Stabilize join distribution in test_ivm_explain_re…
yujun777 Aug 25, 2026
1eb0634
[fix](fe) Install cloud table stream read states for IVM refresh
yujun777 Aug 26, 2026
1625b4e
[test](regression) Skip three IVM suites on cloud mode with reasons
yujun777 Aug 26, 2026
e1f141d
[fix](fe) Always fully refresh COMPLETE-method MTMV on AUTO trigger
yujun777 Aug 26, 2026
cafa60d
[fix](fe) Fix checkstyle issues introduced by rebase conflict resolution
yujun777 Aug 27, 2026
5895786
[fix](test) Call CloudTableStreamReadStateHook.installReadStates in s…
yujun777 Aug 27, 2026
376b597
[fix](fe) Use row-binlog lsn as the deterministic IVM row-id for DUP …
yujun777 Aug 27, 2026
e234ad2
[fix](fe) Rebuild invalidated MTMV baseline on AUTO refresh (#33)
seawinde Aug 28, 2026
7d4a822
[feat](mtmv) Add ivm_partition_window_limit for lossy IVM incremental…
yujun777 Aug 28, 2026
6586e62
[feat](mtmv) Allow OneRowRelation in partitioned IVM MVs
yujun777 Aug 28, 2026
4bc05c1
[fix](test) Adapt IVM delta tests to the dynamic stream schema
yujun777 Sep 1, 2026
648ebc9
[fix](test) Adapt IVM join and command tests to lsn row-id and stream…
yujun777 Sep 1, 2026
91c2119
[fix](test) Adapt test_create_mtmv_with_view to excluded_trigger_tabl…
yujun777 Sep 1, 2026
434a785
[fix](fe) Expose row LSN column for DUP table stream snapshot reads
yujun777 Sep 1, 2026
e788ee5
[fix](mtmv) Force complete refresh when ivm_partition_window_limit is…
yujun777 Sep 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
118 changes: 118 additions & 0 deletions be/test/storage/segment/row_binlog_source_data_writer_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

#include <gtest/gtest.h>

#include <memory>
#include <string>
#include <vector>

#include "core/field.h"
#include "core/value/decimalv2_value.h"
#include "storage/binlog.h"
#include "storage/iterator/olap_data_convertor.h"
#include "storage/segment/row_binlog_segment_writer.h"
#include "storage/tablet/tablet_schema.h"

namespace doris::segment_v2 {

namespace {

TabletColumn create_column(int32_t unique_id, const std::string& name, FieldType type, bool is_key,
bool visible) {
TabletColumn column(FieldAggregationMethod::OLAP_FIELD_AGGREGATION_NONE, type, !is_key);
column.set_unique_id(unique_id);
column.set_name(name);
column.set_is_key(is_key);
column.set_length(type == FieldType::OLAP_FIELD_TYPE_LARGEINT ? 16 : 4);
column.set_index_length(column.length());
column._visible = visible;
return column;
}

TabletSchemaSPtr create_ivm_source_schema() {
auto schema = std::make_shared<TabletSchema>();
schema->append_column(create_column(0, "k1", FieldType::OLAP_FIELD_TYPE_INT, true, true));
schema->append_column(create_column(1, "__DORIS_IVM_ROW_ID_COL__",
FieldType::OLAP_FIELD_TYPE_LARGEINT, true, false));
schema->append_column(create_column(2, "v1", FieldType::OLAP_FIELD_TYPE_INT, false, true));
schema->append_column(create_column(3, "__DORIS_IVM_AGG_STATE_COL__",
FieldType::OLAP_FIELD_TYPE_INT, false, false));
schema->_keys_type = UNIQUE_KEYS;
return schema;
}

Block create_source_block(const TabletSchemaSPtr& schema) {
Block block = schema->create_block();
auto columns_guard = block.mutate_columns_scoped();
auto& columns = columns_guard.mutable_columns();
for (int i = 0; i < 2; ++i) {
columns[0]->insert(Field::create_field<TYPE_INT>(10 + i));
columns[1]->insert(Field::create_field<TYPE_LARGEINT>(static_cast<int128_t>(1000 + i)));
columns[2]->insert(Field::create_field<TYPE_INT>(100 + i));
columns[3]->insert(Field::create_field<TYPE_INT>(10000 + i));
}
return block;
}

} // namespace

TEST(RowBinlogSourceDataWriterTest, collectHiddenRowIdKeyInNormalPrefix) {
auto source_schema = create_ivm_source_schema();
SegmentWriteBinlogOptions options;
options.source.tablet_schema = source_schema;

RowBinlogSourceDataWriter writer(options);
ASSERT_TRUE(writer.init().ok());
EXPECT_EQ(3, writer.normal_column_count());

Block block = create_source_block(source_schema);
Block full_block = source_schema->create_block();
std::vector<uint32_t> partial_source_cids;
ASSERT_TRUE(
writer.prepare_by_source_block(&block, 0, 2, partial_source_cids, &full_block).ok());

const auto& key_columns = writer.source_key_columns();
ASSERT_EQ(2, key_columns.size());

ASSERT_NE(nullptr, key_columns[0]->get_data_at(1));
EXPECT_EQ(11, *reinterpret_cast<const int32_t*>(key_columns[0]->get_data_at(1)));

ASSERT_NE(nullptr, key_columns[1]->get_data_at(1));
EXPECT_EQ(static_cast<int128_t>(1001),
*reinterpret_cast<const int128_t*>(key_columns[1]->get_data_at(1)));
}

TEST(RowBinlogSourceDataWriterTest, collectVisibleColumnAfterHiddenNonKeyColumn) {
auto source_schema = std::make_shared<TabletSchema>();
source_schema->append_column(
create_column(0, "k1", FieldType::OLAP_FIELD_TYPE_INT, true, true));
source_schema->append_column(create_column(1, "__DORIS_IVM_AGG_STATE_COL__",
FieldType::OLAP_FIELD_TYPE_INT, false, false));
source_schema->append_column(
create_column(2, "v1", FieldType::OLAP_FIELD_TYPE_INT, false, true));
source_schema->_keys_type = UNIQUE_KEYS;

SegmentWriteBinlogOptions options;
options.source.tablet_schema = source_schema;

RowBinlogSourceDataWriter writer(options);
ASSERT_TRUE(writer.init().ok());
EXPECT_EQ(2, writer.normal_column_count());
}

} // namespace doris::segment_v2
17 changes: 17 additions & 0 deletions fe/fe-catalog/src/main/java/org/apache/doris/catalog/Column.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,27 @@ public class Column implements GsonPostProcessable {
public static final String HIDDEN_COLUMN_PREFIX = "__DORIS_";
// all shadow indexes should have this prefix in name
public static final String SHADOW_NAME_PREFIX = "__doris_shadow_";
public static final String IVM_HIDDEN_COLUMN_PREFIX = "__DORIS_IVM_";
// NOTE: you should name hidden column start with '__DORIS_' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
public static final String DELETE_SIGN = "__DORIS_DELETE_SIGN__";
public static final String WHERE_SIGN = "__DORIS_WHERE_SIGN__";
public static final String SEQUENCE_COL = "__DORIS_SEQUENCE_COL__";
public static final String GLOBAL_ROWID_COL = "__DORIS_GLOBAL_ROWID_COL__";
public static final String IVM_ROW_ID_COL = "__DORIS_IVM_ROW_ID_COL__";
public static final String IVM_AGG_COUNT_COL = "__DORIS_IVM_AGG_COUNT_COL__";
public static final String IVM_DML_FACTOR_COL = "__DORIS_IVM_DML_FACTOR_COL__";
public static final String IVM_BASE_OP_COL = "__DORIS_IVM_BASE_OP_COL__";
public static final String IVM_DELTA_GROUP_COUNT_COL = "__DORIS_IVM_DELTA_GROUP_COUNT_COL__";
// Prefix for sink-level IVM identity key hidden columns (__DORIS_IVM_KEY_).
public static final String IVM_KEY_COL_PREFIX = IVM_HIDDEN_COLUMN_PREFIX + "KEY_";
// Prefix for union arm-index columns (__DORIS_IVM_UNION_ARM_INDEX_).
public static final String IVM_UNION_ARM_INDEX_COL_PREFIX = IVM_HIDDEN_COLUMN_PREFIX + "UNION_ARM_INDEX_";
// Prefix for union positional key columns (__DORIS_IVM_UNION_KEY_).
public static final String IVM_UNION_KEY_COL_PREFIX = IVM_HIDDEN_COLUMN_PREFIX + "UNION_KEY_";
// Suffix for the renamed base-table row-id column (__DORIS_IVM_{n}_ROW_ID_COL__), using the
// standard IVM hidden-column prefix. Kept as an identity key when a cascading MV with only
// row-id keys is scanned under a join.
public static final String IVM_BASE_ROW_ID_COL_SUFFIX = "_ROW_ID_COL__";
public static final String ROW_STORE_COL = "__DORIS_ROW_STORE_COL__";
public static final String VERSION_COL = "__DORIS_VERSION_COL__";
public static final String SKIP_BITMAP_COL = "__DORIS_SKIP_BITMAP_COL__";
Expand Down Expand Up @@ -285,6 +301,7 @@ public Column(String name, Type type, boolean isKey, AggregateType aggregateType
false, null, null, Sets.newHashSet(), null);
}


public Column(String name, Type type, boolean isKey, AggregateType aggregateType, boolean isAllowNull,
String defaultValue, String comment, boolean visible, int colUniqueId) {
this(name, type, isKey, aggregateType, isAllowNull, -1, defaultValue, comment, visible, null, colUniqueId, null,
Expand Down
105 changes: 96 additions & 9 deletions fe/fe-core/src/main/java/org/apache/doris/alter/Alter.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.apache.doris.catalog.Tablet;
import org.apache.doris.catalog.View;
import org.apache.doris.catalog.info.TableNameInfo;
import org.apache.doris.catalog.stream.BaseTableStream;
import org.apache.doris.cloud.alter.CloudSchemaChangeHandler;
import org.apache.doris.common.AnalysisException;
import org.apache.doris.common.Config;
Expand All @@ -49,9 +50,15 @@
import org.apache.doris.datasource.ExternalTable;
import org.apache.doris.info.TableNameInfoUtils;
import org.apache.doris.mtmv.BaseTableInfo;
import org.apache.doris.mtmv.MTMVPartitionUtil;
import org.apache.doris.mtmv.MTMVPropertyUtil;
import org.apache.doris.mtmv.MTMVRelation;
import org.apache.doris.mtmv.MTMVUtil;
import org.apache.doris.mtmv.ivm.IvmUtil;
import org.apache.doris.nereids.trees.plans.commands.AlterSystemCommand;
import org.apache.doris.nereids.trees.plans.commands.AlterTableCommand;
import org.apache.doris.nereids.trees.plans.commands.AlterViewCommand;
import org.apache.doris.nereids.trees.plans.commands.CreateMTMVCommand;
import org.apache.doris.nereids.trees.plans.commands.CreateMaterializedViewCommand;
import org.apache.doris.nereids.trees.plans.commands.DropMaterializedViewCommand;
import org.apache.doris.nereids.trees.plans.commands.info.AddColumnOp;
Expand Down Expand Up @@ -359,7 +366,6 @@ private boolean processAlterOlapTableInternal(List<AlterOp> alterOps, OlapTable
Env.getCurrentEnv().getMtmvService()
.alterTable(oldBaseTableInfo, newBaseTableInfo, currentAlterOps.hasReplaceTableOp());
}

olapTable.writeLock();
try {
NereidsSqlCacheManager sqlCacheManager = Env.getCurrentEnv().getSqlCacheManager();
Expand Down Expand Up @@ -678,6 +684,12 @@ public void processReplaceTable(Database db, OlapTable origTable, String newTblN
if (swapTable) {
origTable.checkAndSetName(newTblName, true);
}
// REPLACE TABLE affects dependencies of both logical names. Persist both
// barriers before changing the catalog or journaling the replacement.
Env.getCurrentEnv().getMtmvService().getRelationManager().markIvmBaselineRebuild(
new BaseTableInfo(origTable), "Base table replace changed IVM baseline");
Env.getCurrentEnv().getMtmvService().getRelationManager().markIvmBaselineRebuild(
new BaseTableInfo(olapNewTbl), "Base table replace changed IVM baseline");
replaceTableInternal(db, origTable, olapNewTbl, swapTable, false, isForce);
// write edit log
ReplaceTableOperationLog log = new ReplaceTableOperationLog(db.getId(),
Expand Down Expand Up @@ -743,6 +755,10 @@ private void replaceTableInternal(Database db, OlapTable origTable, OlapTable ne
if (!isReplay) {
Env.getCurrentEnv().getConstraintManager().checkNoReferencingForeignKeys(origTableInfo);
}
if (origTable instanceof MTMV) {
Env.getCurrentInternalCatalog().unprotectDropIvmStreams(
db, (MTMV) origTable, isForce, isReplay);
}
Env.getCurrentEnv().getConstraintManager().dropAndRenameConstraints(origTableInfo, newTableInfo);
}

Expand Down Expand Up @@ -1267,7 +1283,6 @@ public AlterHandler getSystemHandler() {
public void processAlterMTMV(AlterMTMV alterMTMV, boolean isReplay) {
TableNameInfo tbl = alterMTMV.getMvName();
MTMV mtmv = null;
boolean alterSuccess = true;
try {
Database db = Env.getCurrentInternalCatalog().getDbOrDdlException(tbl.getDb());
mtmv = (MTMV) db.getTableOrMetaException(tbl.getTbl(), TableType.MATERIALIZED_VIEW);
Expand All @@ -1279,31 +1294,103 @@ public void processAlterMTMV(AlterMTMV alterMTMV, boolean isReplay) {
mtmv.alterStatus(alterMTMV.getStatus());
break;
case ALTER_PROPERTY:
mtmv.alterMvProperties(alterMTMV.getMvProperties());
break;
if (mtmv.isIvm() && alterMTMV.getMvProperties().containsKey(
PropertyAnalyzer.PROPERTIES_EXCLUDED_TRIGGER_TABLES)) {
Set<TableNameInfo> oldExcludedTriggerTables = mtmv.getExcludedTriggerTables();
Set<TableNameInfo> newExcludedTriggerTables = MTMVPropertyUtil.parseTableNameInfos(
alterMTMV.getMvProperties().get(
PropertyAnalyzer.PROPERTIES_EXCLUDED_TRIGGER_TABLES));
updateIvmStreamsForExcludedTables(db, mtmv, oldExcludedTriggerTables,
newExcludedTriggerTables, isReplay);
}
mtmv.alterMvProperties(alterMTMV, isReplay);
return;
case ADD_TASK:
alterSuccess = mtmv.addTaskResult(alterMTMV.getTask(), alterMTMV.getRelation(),
alterMTMV.getPartitionSnapshots(),
isReplay);
if (!mtmv.addTaskResult(alterMTMV, isReplay)) {
return;
}
// If it is not a replay thread, it means that the current service is already a new version
// and does not require compatibility
if (isReplay) {
mtmv.compatible(Env.getCurrentEnv().getCatalogMgr());
}
return;
case ALTER_IVM_INFO:
// Live IVM changes are journaled inside MTMV; this branch applies the journal snapshot.
mtmv.alterIvmInfo(alterMTMV.getIvmInfo());
break;
default:
throw new RuntimeException("Unknown type value: " + alterMTMV.getOpType());
}
if (alterMTMV.isNeedRebuildJob()) {
Env.getCurrentEnv().getMtmvService().alterJob(mtmv, isReplay);
}
// 4. log it and replay it in the follower
if (!isReplay && alterSuccess) {
if (!isReplay) {
Env.getCurrentEnv().getEditLog().logAlterMTMV(alterMTMV);
}
} catch (UserException e) {
// if MTMV has been dropped, ignore this exception
LOG.warn(e);
}
}

private void updateIvmStreamsForExcludedTables(Database db, MTMV mtmv,
Set<TableNameInfo> oldExcludedTriggerTables, Set<TableNameInfo> newExcludedTriggerTables,
boolean isReplay) throws UserException {
MTMVRelation relation = mtmv.getRelation();
if (relation == null || relation.getBaseTables() == null) {
return;
}
Set<BaseTableInfo> baseTables = relation.getBaseTables();
for (BaseTableInfo baseTableInfo : baseTables) {
TableNameInfo baseTableName = new TableNameInfo(baseTableInfo.getCtlName(),
baseTableInfo.getDbName(), baseTableInfo.getTableName());
boolean wasExcluded = MTMVPartitionUtil.isTableExcluded(
oldExcludedTriggerTables, baseTableName);
boolean isExcluded = MTMVPartitionUtil.isTableExcluded(
newExcludedTriggerTables, baseTableName);
if (wasExcluded && !isExcluded) {
if (!isReplay) {
TableIf baseTable = MTMVUtil.getTable(baseTableInfo);
CreateMTMVCommand.createTableStream(ConnectContext.get(), db, mtmv, baseTable);
}
}
}
db.writeLockOrDdlException();
try {
for (BaseTableInfo baseTableInfo : baseTables) {
TableNameInfo baseTableName = new TableNameInfo(baseTableInfo.getCtlName(),
baseTableInfo.getDbName(), baseTableInfo.getTableName());
if (!MTMVPartitionUtil.isTableExcluded(newExcludedTriggerTables, baseTableName)) {
continue;
}
List<String> baseTableFullQualifiers = baseTableInfo.toList();
String streamName = IvmUtil.streamName(mtmv.getId(), baseTableFullQualifiers);
TableIf streamTable = db.getTableNullable(streamName);
if (streamTable == null) {
continue;
}
if (!(streamTable instanceof BaseTableStream)) {
LOG.warn("skip dropping IVM stream candidate {} because it is not a stream", streamName);
continue;
}
if (!IvmUtil.isStreamOwnedBy((BaseTableStream) streamTable, baseTableFullQualifiers)) {
LOG.warn("skip dropping IVM stream candidate {} because it belongs to another base table",
streamName);
continue;
}
Table table = (Table) streamTable;
table.writeLock();
try {
Env.getCurrentEnv().unprotectDropTable(db, table, true, isReplay, 0L);
} finally {
table.writeUnlock();
}
LOG.info("dropped IVM stream {} because its base table is excluded from MTMV",
streamName);
}
} finally {
db.writeUnlock();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.apache.doris.common.util.DynamicPartitionUtil;
import org.apache.doris.common.util.MasterDaemon;
import org.apache.doris.common.util.TimeUtils;
import org.apache.doris.mtmv.BaseTableInfo;
import org.apache.doris.persist.RecoverInfo;
import org.apache.doris.persist.gson.GsonUtils;
import org.apache.doris.qe.GlobalVariable;
Expand All @@ -49,6 +50,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
Expand Down Expand Up @@ -1065,6 +1067,10 @@ public void recoverPartition(long dbId, OlapTable table, String partitionName,
recoverPartition.setName(newPartitionName);
}

Env.getCurrentEnv().getMtmvService().getRelationManager().markIvmBaselineRebuildForPartitionChange(
new BaseTableInfo(table, dbId),
Collections.singletonMap(partitionName, recoverPartition.getId()),
"Base table partition was recovered without row binlog");
// recover partition
table.addPartition(recoverPartition);

Expand Down
Loading