创建表:
CREATE TABLE test (
a tinyint(4) NULL DEFAULT "0" ,
b int(11) DEFAULT "0" ,
c int(11) DEFAULT "0" ,
t DATETIMEV2 COMMENT "时间",
d bigint(20) SUM NULL DEFAULT "0",
e bigint(20) SUM NULL DEFAULT "0"
)
AGGREGATE KEY(a, b, c, t)
PARTITION BY RANGE(t) ()
DISTRIBUTED BY HASH(a) BUCKETS AUTO
PROPERTIES
(
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.start" = "-3",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.create_history_partition" = "true",
"dynamic_partition.history_partition_num" = "3",
"dynamic_partition.replication_num" = "2",
"light_schema_change" = "true"
);
创建异步物化视图:
CREATE MATERIALIZED VIEW mv_test
BUILD DEFERRED
REFRESH AUTO
ON SCHEDULE EVERY 2 MINUTE
PARTITION BY (t)
DISTRIBUTED BY RANDOM BUCKETS 2
PROPERTIES (
"replication_num" = "1"
)
AS
SELECT a,b,t,SUM(d) FROM test GROUP BY 1,2,3
报错:
官网文档这些条件应该都是满足的:
请问一下我是哪里没有搞对吗?