StarRocks/starrocks
The error message for partition expr is not correct.
Offen
#68.567 geöffnet am 28.01.2026
good first issuetype/bug
Repository-Metriken
- Stars
- (5.717 Sterne)
- PR-Merge-Metriken
- (Durchschn. Merge 1T 5h) (1.000 gemergte PRs in 30 T)
Beschreibung
Steps to reproduce the behavior (Required)
StarRocks > CREATE TABLE IF NOT EXISTS `test_schema_yq4hcg84`.`sr_mv_combo_a_src`
(`order_id` BIGINT, `event_date` DATE, `customer_id` INT, `amount` DECIMAL(18, 2), `region` VARCHAR(50))
PRIMARY KEY (`order_id`, `event_date`)
PARTITION BY `event_date`;
ERROR 1064 (HY000): Getting analyzing error. Detail message: The partition expr should base on key column.
StarRocks > CREATE TABLE IF NOT EXISTS `test_schema_yq4hcg84`.`sr_mv_combo_a_src`
(`order_id` BIGINT, `event_date` DATE, `customer_id` INT, `amount` DECIMAL(18, 2), `region` VARCHAR(50))
PRIMARY KEY (`order_id`, `event_date`)
PARTITION BY (`event_date`);
Query OK, 0 rows affected (0.03 sec)
The only diff is the parentheses for PARTITION BY.
- PARTITION BY
event_date - PARTITION BY (
event_date)
Expected behavior (Required)
- According to the expression partitioning syntax, the first only should be success too.
- And error "The partition expr should base on key column" is not correct.
Real behavior (Required)
ERROR 1064 (HY000): Getting analyzing error. Detail message: The partition expr should base on key column.
for the first create table statement.
StarRocks version (Required)
- 3.5.8