Yukang-Lian opened a new pull request, #67245:
URL: https://github.com/apache/doris/pull/67245
### What problem does this PR solve?
Issue Number: None
Related PR: #62875
Problem Summary: Adding a key column to a merge-on-write unique table
updates every visible materialized index schema without updating its
synchronous materialized view definition. Queries rewritten to that index can
then decode stored rows with the wrong schema and return incorrect values.
Reject this unsupported schema change while a visible synchronous
materialized view or rollup exists. Users can drop the materialized index, add
the key column, and recreate it. Value-column additions remain unchanged.
### Release note
Reject adding key columns to merge-on-write unique tables while synchronous
materialized views or rollups exist.
### Check List (For Author)
- Test: Unit Test
- ./run-fe-ut.sh --run
org.apache.doris.alter.SchemaChangeHandlerTest#testUniqAddKeyColumnWithSyncMv+testUniqAddKeyColumnWithRollup
(2 tests passed)
- Behavior changed: Yes (unsafe key-column additions are rejected until
synchronous materialized views or rollups are dropped)
- Does this need documentation: No
Co-authored-by: Siyang Tang <[email protected]>
--
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]