ruyliu opened a new issue, #9274: URL: https://github.com/apache/incubator-doris/issues/9274
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues. ### Version 0.15 ### What's Wrong? Create materialized view with table who has list partition failed. ### What You Expected? create and use materialized view. ### How to Reproduce? CREATE TABLE example_tbl ( `city` VARCHAR(20) NOT NULL COMMENT "用户所在城市", `user_id` BIGINT NOT NULL COMMENT "用户id", `date` DATE NOT NULL COMMENT "数据灌入日期时间", `age` SMALLINT NOT NULL COMMENT "用户年龄", `sex` TINYINT NOT NULL COMMENT "用户性别", `cost` BIGINT NOT NULL DEFAULT "0" COMMENT "用户总消费" ) DUPLICATE KEY(`city`) PARTITION BY LIST(`city`) ( PARTITION p_bj VALUES IN ("beijing"), PARTITION p_gz VALUES IN ("guangzhou"), PARTITION p_sz VALUES IN ("shenzhen") ) DISTRIBUTED BY HASH(`date`) BUCKETS 10 PROPERTIES("replication_num" = "1"); create materialized view t_view as select city, user_id, date, sum(cost) from example_tbl group by city, user_id, date; ### Anything Else? Error Info: java.lang.ClassCastException: org.apache.doris.catalog.ListPartitionInfo cannot be cast to org.apache.doris.catalog.RangePartitionInfo at org.apache.doris.catalog.OlapTable.getPartitionColumnNames(OlapTable.java:627) ~[palo-fe.jar:3.4.0] at org.apache.doris.alter.MaterializedViewHandler.checkAndPrepareMaterializedView(MaterializedViewHandler.java:479) ~[palo-fe.jar:3.4.0] at org.apache.doris.alter.MaterializedViewHandler.processCreateMaterializedView(MaterializedViewHandler.java:199) ~[palo-fe.jar:3.4.0] at org.apache.doris.alter.Alter.processCreateMaterializedView(Alter.java:113) ~[palo-fe.jar:3.4.0] at org.apache.doris.catalog.Catalog.createMaterializedView(Catalog.java:5213) ~[palo-fe.jar:3.4.0] at org.apache.doris.qe.DdlExecutor.execute(DdlExecutor.java:135) ~[palo-fe.jar:3.4.0] at org.apache.doris.qe.StmtExecutor.handleDdlStmt(StmtExecutor.java:1441) ~[palo-fe.jar:3.4.0] at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:394) ~[palo-fe.jar:3.4.0] at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:297) ~[palo-fe.jar:3.4.0] at org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:217) ~[palo-fe.jar:3.4.0] at org.apache.doris.qe.ConnectProcessor.dispatch(ConnectProcessor.java:355) ~[palo-fe.jar:3.4.0] at org.apache.doris.qe.ConnectProcessor.processOnce(ConnectProcessor.java:556) ~[palo-fe.jar:3.4.0] at org.apache.doris.mysql.nio.ReadListener.lambda$handleEvent$0(ReadListener.java:50) ~[palo-fe.jar:3.4.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_282] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_282] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_282] <img width="1113" alt="image" src="https://user-images.githubusercontent.com/88014713/165663647-6c4b8a14-5444-43d1-9352-b798e2f798f0.png"> ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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]
