【已解决】doris2.1.1版本自动分区问题

Viewed 121

建表语句:

CREATE TABLE financing_logs_api (
create_time DATETIME ( 3 ) NOT NULL COMMENT '生成时间',
id VARCHAR ( 32 ) NOT NULL,
....
__op BIGINT NULL COMMENT 'DDL标志'
) ENGINE = OLAP UNIQUE KEY ( create_time, id ) COMMENT '数据源响应日志' AUTO PARTITION BY RANGE date_trunc ( create_time, 'week' ) () DISTRIBUTED BY HASH ( create_time ) BUCKETS 10 PROPERTIES (
"replication_allocation" = "tag.location.default: 1"
);

导入数据报错:
image.png

fe/be节点:image.png

1 Answers

【问题状态】已解决
这是不支持用法,报错信息有待优化。date_trunc目前只支持year、month、day、hour、minute、second
week已经提pr支持,将在下个版本合并。
https://github.com/apache/doris/pull/33439/files