期望doris能支持以下异步物化视图构建能力,其中user_id在基表中为倒排索引,在异步物化视图也同样可配置倒索索引:
CREATE MATERIALIZED VIEW view_flink_to_doris_month1 BUILD DEFERRED REFRESH AUTO ON MANUAL partition by(cur_time) DISTRIBUTED BY hash(user_id) BUCKETS 19 PROPERTIES (
"replication_num" = "1",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "MONTH",
"dynamic_partition.start" = "-48",
"dynamic_partition.end" = "1",
"dynamic_partition.prefix" = "m",
"dynamic_partition.buckets" = "19"
) AS
select
date_trunc(cur_time,'month'),
hour(cur_time),
user_id,
device_code,
big_type,
alert_type,
sum(alert_count) as alert_count
from
test.flink_to_doris_month
group by
date_trunc(cur_time,'month'),
hour(cur_time),
user_id,
device_code,
big_type,
alert_type;