Skip to content

[Bug] dynamic partition is not work #48989

@qidaye

Description

@qidaye

Search before asking

  • I had searched in the issues and found no similar issues.

Version

3.0.4

What's Wrong?

mysql> alter table ods_kafka_ai_chat_prompt_rt add partition p20250316 values [('2025-03-16 00:00:00'),('2025-03-17 00:00:00'));
ERROR 1105 (HY000): Unexpected exception: Cannot invoke "java.util.List.iterator()" because "this.columnUniqueIds" is null

What You Expected?

Add partition normally.

How to Reproduce?

Create table in 3.0.2.

CREATE TABLE `ods_kafka_ai_chat_prompt_rt` (
  `msg_id` largeint NULL COMMENT "消息id",
  `api_key` varchar(2048) NULL COMMENT "apiKey",
  `api_key_alias` varchar(4096) NULL COMMENT "apiKey 别名",
  `model` varchar(2048) NULL COMMENT "模型",
  `messages` text NULL COMMENT "消息内容",
  `qpm` int NULL COMMENT "每分钟请求数限制",
  `temperature` decimal(10,2) NULL,
  `max_tokens` int NULL COMMENT "每分钟请求数限制",
  `token_per_min` bigint NULL COMMENT "每分钟token限额",
  `token_per_msg` bigint NULL COMMENT "单条token限额",
  `create_time` datetime NULL COMMENT "创建时间",
  `update_time` datetime NULL COMMENT "修改时间",
  INDEX idx_msg_id (`msg_id`) USING INVERTED,
  INDEX idx_api_key (`api_key`) USING INVERTED,
  INDEX idx_api_key_alias (`api_key_alias`) USING INVERTED,
  INDEX idx_model (`model`) USING INVERTED
) ENGINE=OLAP
DUPLICATE KEY(`msg_id`, `api_key`, `api_key_alias`, `model`)
PARTITION BY RANGE(`create_time`)()
DISTRIBUTED BY RANDOM BUCKETS AUTO
PROPERTIES (
"file_cache_ttl_seconds" = "0",
"bloom_filter_columns" = "api_key, model, msg_id, api_key_alias",
"is_being_synced" = "false",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-2147483648",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "10",
"dynamic_partition.create_history_partition" = "false",
"dynamic_partition.history_partition_num" = "-1",
"dynamic_partition.hot_partition_num" = "0",
"dynamic_partition.reserved_history_periods" = "NULL",
"storage_medium" = "hdd",
"storage_format" = "V2",
"inverted_index_storage_format" = "V2",
"light_schema_change" = "true",
"disable_auto_compaction" = "false",
"enable_single_replica_compaction" = "false",
"group_commit_interval_ms" = "10000",
"group_commit_data_bytes" = "134217728"
); 

Upgrade to 3.0.4

Then dynamic partition will not work.


ALTER TABLE ods_kafka_ai_chat_prompt_rt SET ("dynamic_partition.enable" = "false");
alter table ods_kafka_ai_chat_prompt_rt add partition p20250316 values [('2025-03-16 00:00:00'),('2025-03-17 00:00:00'));

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

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