【详述】通过外部Mysql JDBC Catalog来创建异步物化视图,可以正常创建。但是查看刷新物化视图任务是失败状态,报错:java.lang.IllegalStateException: corrupted partition meta,且此时直接查询该外部表数据是空的(实际上有数据),问题类似github社区的此类反馈https://github.com/StarRocks/starrocks/issues/35898
【背景】只是创建了针对Mysql JDBC Catalog表的物化视图
【StarRocks版本】3.1.5
【详细步骤示例】:
- 在Mysql数据库创建基表test.demo
- 在Starrocks上创建对应的Mysql Catalog:bi
- 根据bi.test.demo在Starrocks上创建物化视图:
CREATE MATERIALIZED VIEW mv_demo comment “demo”
DISTRIBUTED BY HASH(id
)
REFRESH ASYNC EVERY (interval 6 hour)
AS SELECT id, stat_date, goods_name, sku, brand, primary_category, secondary_category
FROM bi.test.demo; - 查看已有的物化视图任务:select * from information_schema.tasks order by CREATE_TIME desc limit 10;
- 根据task id得到执行状态:select * from information_schema.task_runs
where task_name=‘mv-44312306’ order by CREATE_TIME desc;