EmmyMiao87 opened a new issue #4374:
URL: https://github.com/apache/incubator-doris/issues/4374
**Describe the bug**
Drop column on materialized view by AlterClause.
The alter job is failed with error msg: Create replicas failed.
**To Reproduce**
Steps to reproduce the behavior:
1. create table
```
CREATE TABLE `test_sys_materialized_view_2_test_drop_column_with_mv_tb` (
`k0` boolean NOT NULL COMMENT "",
`k1` tinyint(4) NOT NULL COMMENT "",
`k2` smallint(6) NOT NULL COMMENT "",
`k3` int(11) NOT NULL COMMENT "",
`k4` bigint(20) NOT NULL COMMENT "",
`k5` largeint(40) NOT NULL COMMENT "",
`k6` decimal(9, 3) NOT NULL COMMENT "",
`k7` char(5) NOT NULL COMMENT "",
`k8` date NOT NULL COMMENT "",
`k9` datetime NOT NULL COMMENT "",
`k10` varchar(20) NOT NULL COMMENT "",
`k11` double NOT NULL COMMENT "",
`k_new_1` int(11) NULL COMMENT "",
`k_new` float NULL COMMENT "",
`k12` float NOT NULL COMMENT ""
) ENGINE=OLAP
DUPLICATE KEY(`k0`, `k1`, `k2`)
COMMENT "OLAP"
PARTITION BY RANGE(`k1`)
(PARTITION p1 VALUES [("-128"), ("-10")),
PARTITION p2 VALUES [("-10"), ("0")),
PARTITION p3 VALUES [("0"), ("10")),
PARTITION p4 VALUES [("10"), ("20")))
DISTRIBUTED BY HASH(`k4`, `k5`) BUCKETS 10
PROPERTIES (
"replication_num" = "1",
"in_memory" = "false",
"storage_format" = "DEFAULT"
);
```
2. create materialized view
```
CREATE MATERIALIZED VIEW
test_sys_materialized_view_2_test_drop_column_with_mv_index AS SELECT k0,
max(k9), min(k11), sum(k12), hll_union(hll_hash(k7)) from
test_sys_materialized_view_2_test_drop_column_with_mv_tb group by k0
```
3. drop column k12 on mv
```
ALTER TABLE test_sys_materialized_view_2_test_drop_column_with_mv_tb DROP
COLUMN k12 FROM test_sys_materialized_view_2_test_drop_column_with_mv_index
```
4. alter job is failed
```
Create replicas failed. Error: Error replicas:xxxx
```
**Expected behavior**
Alter job is successful.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]