Closed yongbingwang closed 2 years ago
create table t1 ( `k1` bigint not null , `k2` int not null , `k3` smallint not null , `k4` date not null , `k5` datetime not null , `v1` varchar not null , `v2` string not null )engine=olap duplicate key (k1,k2,k3,k4,k5) distributed by hash(v1) BUCKETS 10 PROPERTIES ("replication_num" = "1");
create table error.
mysql> create table t1 ( -> `k1` bigint not null , -> `k2` int not null , -> `k3` smallint not null , -> `k4` date not null , -> `k5` datetime not null , -> `v1` varchar not null , -> `v2` string not null -> )engine=olap duplicate key (k1,k2,k3,k4,k5) -> distributed by hash(v1) -> BUCKETS 10 PROPERTIES ("replication_num" = "1"); Query OK, 0 rows affected (0.17 sec) mysql> desc t1; +-------+----------------+------+-------+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+----------------+------+-------+---------+-------+ | k1 | BIGINT | No | true | NULL | | | k2 | INT | No | true | NULL | | | k3 | SMALLINT | No | true | NULL | | | k4 | DATE | No | true | NULL | | | k5 | DATETIME | No | true | NULL | | | v1 | VARCHAR(1) | No | false | NULL | | | v2 | VARCHAR(65533) | No | false | NULL | | +-------+----------------+------+-------+---------+-------+ 7 rows in set (0.03 sec)
select current_version()
why value type column can not be used as a distributed key for duplicate table?
Steps to reproduce the behavior (Required)
Expected behavior (Required)
create table error.
Real behavior (Required)
StarRocks version (Required)
select current_version()