针对单个表做物化视图,然后join统计,改写提示:View struct info is invalid

Viewed 2

doris版本:2.1.6 目前这个情况从哪里定位问题,看schema都是常规的数据类型

测试场景:将三个表:oracle_test.TEST.test01、oracle_test.TEST.test02、oracle_test.TEST.test03全表做了物化视图

---物化视图SQL
CREATE MATERIALIZED VIEW mv1
BUILD IMMEDIATE REFRESH AUTO ON SCHEDULE EVERY 1 DAY STARTS "2024-11-21 19:10:00"
DISTRIBUTED BY RANDOM BUCKETS 3
PROPERTIES ('replication_num' = '1')
as
select * from oracle_test.TEST.test01; (其他两个表同理)

然后用这三个关联统计数据,目前物化视图的改写情况
select
c.OFFICE_NAME,sum(a.MONEY)
from oracle_test.TEST.test01 a
left join oracle_test.TEST.test02 b on a.DATE_ID=b.ID
left join oracle_test.TEST.test03 c on a.BILLING_OFFICE_ID=c.ID
group by c.OFFICE_NAME

| MaterializedView |
| MaterializedViewRewriteSuccessAndChose: |
| |
| MaterializedViewRewriteSuccessButNotChose: |
| |
| MaterializedViewRewriteFail: |
| Name: internal#db1#mv1 |
| FailSummary: View struct info is invalid |
| Name: internal#db1#mv3 |
| FailSummary: View struct info is invalid |
| Name: internal#db1#mv2 |
| FailSummary: View struct info is invalid |
+-------------------------------------------------------------------------------------------+

0 Answers