Skip to content

转换表为动态分区失败 #6170

@yedajiang44

Description

@yedajiang44

按照文档对表进行动态分区转换

ALTER TABLE example_db.`Location` SET
(
    "dynamic_partition.enable" = "true",
    "dynamic_partition.time_unit" = "DAY",
    "dynamic_partition.time_zone" = "Asia/Shanghai",
    "dynamic_partition.buckets"="32",
    "dynamic_partition.start" = "-32",
    "dynamic_partition.end" = "7"
);

但是得到错误

ERROR 1064 (HY000): errCode = 2, detailMessage = Table default_cluster:example_db.Location is not a dynamic partition table. Use command `HELP ALTER TABLE` to see how to change a normal table to a dynamic partition table.

FE已配置dynamic_partition_enable=true
建表语句

CREATE TABLE example_db.`Location` (
  `Id` varchar(36) NOT NULL,
  `SimNumber` varchar(15) NULL,
  `Latitude` int(11) NOT NULL,
  `Longitude` int(11) NOT NULL,
  `Altitude` smallint(6) NOT NULL,
  `Speed` smallint(6) NOT NULL,
  `Direction` smallint(6) NOT NULL,
  `DateTime` datetime NOT NULL,
  `IsBatch` boolean NOT NULL,
  `CreateDateTime` datetime NOT NULL
) ENGINE=OLAP
UNIQUE KEY(`Id`, `SimNumber`)
COMMENT "OLAP"
DISTRIBUTED BY HASH(`SimNumber`) BUCKETS 10
PROPERTIES (
"replication_num" = "1",
"in_memory" = "false",
"storage_format" = "V2"
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions