Repository navigation
建表问题 想用字段cola做唯一键 同时用时间字段colc做分区 应如何建表 #6822
Unanswered
cdavis26424
asked this question in
A - General / Q&A
Replies: 1 comment 1 reply
|
create table test_doris ( |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Doris version 0.12.0-rc03
不能同时用UNIQUE KEY和DUPLICATE KEY
create table test_doris (
cola INT,
colb DECIMAL(8, 3),
colc DATETIME,
cold VARCHAR(30),
cole CHAR(3)
)
UNIQUE KEY(
cola)DUPLICATE KEY(
colc)partition by range (colc)()
DISTRIBUTED BY HASH(
cola)PROPERTIES
(
"replication_num" = "3",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "MONTH",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "16"
);
All reactions