You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/04/28 02:24:17 UTC
[GitHub] [incubator-doris] ruyliu opened a new issue, #9274: [Bug] Materialized View: cannot be cast to RangePartitionInfo
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: commits-unsubscribe@doris.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] yiguolei closed issue #9274: [Bug] Materialized View: cannot be cast to RangePartitionInfo
Posted by GitBox <gi...@apache.org>.
yiguolei closed issue #9274: [Bug] Materialized View: cannot be cast to RangePartitionInfo
URL: https://github.com/apache/incubator-doris/issues/9274
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org