You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e65b4e9
Browse filesBrowse the repository at this point in the historyBrowse files
* [improvement](fe) Add IVM create and alter validation for MTMV (apache#5)
Issue Number: close #xxx
Problem Summary:
1. Remove redundant pre-analysis in IVM analyzeQuery - single analyzeQueryInternal call
2. Unify IVM base table validation error messages (AGG_KEYS vs UNIQUE without MOW)
3. Add excluded_trigger_tables support in IvmNormalizeMtmv (transient row-id for excluded tables)
4. Block ALTER MTMV refresh method to/from INCREMENTAL
5. Validate base table models when ALTER MTMV excluded_trigger_tables
6. Extract MTMVPropertyUtil.parseTableNameInfos utility
7. Add comprehensive unit tests for all validation paths
* [fix](fe) Fix IVM ExprId collision by reusing parser StatementContext
Issue Number: close #xxx
Problem Summary:
Commit 71a3086 introduced a new StatementContext in analyzeQueryInternal()
and restored the original (parser-created) StatementContext in the finally
block. This caused ExprId collisions during IVM INCREMENTAL refresh because
the parser StatementContext has a much smaller ExprId counter than the
analysis StatementContext, and IvmRefreshManager.doRefreshInternal() reads
exprIdStart from the ConnectContext's StatementContext after analysis.
The fix reverts to the pre-71a3086f pattern: reuse ctx.getStatementContext()
(the parser-created StatementContext) directly for analysis instead of
creating a new one. This way all ExprId allocations accumulate in the same
StatementContext that doRefreshInternal() later reads.
None
- Test: Regression test (test_ivm_agg_2)
- Behavior changed: No
- Does this need documentation: No
Co-authored-by: Copilot <[email protected]>
* [fix](fe) Fix buildRowId to compute proper row-id for excluded trigger tables
Issue Number: close #xxx
Problem Summary:
buildRowId() short-circuited to UuidNumeric() for excluded trigger tables,
losing the deterministic row-id (hash of unique keys) for MOW and non-MOW
UNIQUE_KEYS tables. The fix removes the early return and only uses the
isExcludedTriggerTable flag to suppress AnalysisException for unsupported
table types (AGG_KEYS etc.), while UNIQUE_KEYS tables always compute
buildRowIdHash(keySlots) regardless of exclusion status.
None
- Test: Unit Test (IvmNormalizeMtmvTest)
- Behavior changed: No
- Does this need documentation: No
Co-authored-by: Copilot <[email protected]>
* [test](fe) Update IvmNormalizeMtmvTest for excluded MOW table row-id fix
Issue Number: close #xxx
Problem Summary:
Update testExcludedMowTableUsesTransientRowId to expect deterministic
hash-based row-id (Cast expression) instead of UuidNumeric for excluded
MOW tables, matching the fix in buildRowId().
None
- Test: Unit Test (IvmNormalizeMtmvTest - 27 tests pass)
- Behavior changed: No
- Does this need documentation: No
Co-authored-by: Copilot <[email protected]>
* [fix](fe) Refine ALTER MTMV refresh method compatibility rules
Issue Number: close #xxx
Problem Summary:
The ALTER MTMV refresh method validation was too restrictive (blocking all
changes to/from INCREMENTAL) or too permissive in some cases. The new rules:
- COMPLETE <-> INCREMENTAL: forbidden (must recreate MV)
- COMPLETE/INCREMENTAL -> AUTO: allowed
- AUTO -> COMPLETE/INCREMENTAL: forbidden (must recreate MV)
- Same method (no-op): allowed
None
- Test: Regression test
- Behavior changed: Yes (COMPLETE/INCREMENTAL to AUTO now allowed)
- Does this need documentation: No
Co-authored-by: Copilot <[email protected]>
* opt code
* [test](fe) Isolate CreateMTMVCommandTest statement context
Issue Number: None
Related PR: None
Problem Summary: CreateMTMVCommandTest reused the same StatementContext across multiple statements, so table and excluded_trigger_tables state leaked between test cases and caused false incremental MV validation failures. This change resets the statement context for each statement in the test and adds the missing LinkedHashSet import required by StatementContext.
None
- Test: FE unit test
- ./run-fe-ut.sh --run org.apache.doris.mtmv.ivm.IvmAggDeltaStrategyTest,org.apache.doris.mtmv.ivm.IvmDeltaExecutorTest,org.apache.doris.mtmv.ivm.IvmDeltaRewriterTest,org.apache.doris.mtmv.ivm.IvmRefreshManagerTest,org.apache.doris.mtmv.ivm.IvmSimpleScanDeltaStrategyTest,org.apache.doris.mtmv.ivm.IvmUtilTest,org.apache.doris.nereids.rules.rewrite.IvmNormalizeMtmvTest,org.apache.doris.nereids.trees.plans.CreateMTMVCommandTest,org.apache.doris.catalog.ShowCreateMTMVTest
- Behavior changed: No
- Does this need documentation: No
* [fix](fe) Fix TableNameInfo imports after rebasing IVM branch
Issue Number: None
Related PR: None
Problem Summary: Rebase onto the latest yujun777/ivm left several FE IVM files importing
org.apache.doris.info.TableNameInfo while the current base branch provides the type in
org.apache.doris.catalog.info.TableNameInfo. This fixes the stale imports so the rebased
branch compiles and the targeted IVM FE tests run successfully again.
None
- Test: Unit Test
- org.apache.doris.mtmv.ivm.IvmAggDeltaStrategyTest
- org.apache.doris.mtmv.ivm.IvmDeltaExecutorTest
- org.apache.doris.mtmv.ivm.IvmDeltaRewriterTest
- org.apache.doris.mtmv.ivm.IvmRefreshManagerTest
- org.apache.doris.mtmv.ivm.IvmSimpleScanDeltaStrategyTest
- org.apache.doris.mtmv.ivm.IvmUtilTest
- org.apache.doris.nereids.rules.rewrite.IvmNormalizeMtmvTest
- org.apache.doris.nereids.trees.plans.CreateMTMVCommandTest
- org.apache.doris.catalog.ShowCreateMTMVTest
- Behavior changed: No
- Does this need documentation: No
* [fix](fe) Use deterministic row id for excluded AGG_KEYS tables
Issue Number: None
Related PR: None
Problem Summary: IVM normalization treated excluded AGG_KEYS base tables as transient-row-id scans
and generated uuid_numeric() row ids. This changed excluded AGG_KEYS row identity across refreshes
and did not follow the base table aggregate keys. Fix buildRowId to hash base-schema key columns for
excluded AGG_KEYS tables, and add focused tests to verify the row id is deterministic and excludes
non-key value columns.
None
- Test: Unit Test
- org.apache.doris.mtmv.ivm.IvmAggDeltaStrategyTest
- org.apache.doris.mtmv.ivm.IvmDeltaExecutorTest
- org.apache.doris.mtmv.ivm.IvmDeltaRewriterTest
- org.apache.doris.mtmv.ivm.IvmRefreshManagerTest
- org.apache.doris.mtmv.ivm.IvmSimpleScanDeltaStrategyTest
- org.apache.doris.mtmv.ivm.IvmUtilTest
- org.apache.doris.nereids.rules.rewrite.IvmNormalizeMtmvTest
- org.apache.doris.nereids.trees.plans.CreateMTMVCommandTest
- org.apache.doris.catalog.ShowCreateMTMVTest
- Behavior changed: Yes (excluded AGG_KEYS row-id generation is now deterministic on agg keys)
- Does this need documentation: No
* fix comment
* fix comment
* opt code
---------
Co-authored-by: Copilot <[email protected]>
0 commit comments