【已记录】doris range分区数据导入到auto range分区表报错

Viewed 101

doris版本2.1.3

CREATE TABLE `test01` (
  `id` BIGINT NULL,
  `batch_dt` DATE NOT NULL COMMENT '跑批日期'
) ENGINE=OLAP
DUPLICATE KEY(`id`)
COMMENT ''
AUTO PARTITION BY RANGE (`batch_dt`)
()
DISTRIBUTED BY HASH(`id`) BUCKETS 100
PROPERTIES (
"replication_allocation" = "tag.location.default: 3",
"compression" = "ZSTD"
);

CREATE TABLE `test02` (
  `id` BIGINT NULL,
  `batch_dt` DATE NOT NULL COMMENT '跑批日期'
) ENGINE=OLAP
DUPLICATE KEY(`id`)
COMMENT ''
PARTITION BY RANGE (`batch_dt`)
(PARTITION p20231001 VALUES [('2023-10-01'), ('2023-10-02')))
DISTRIBUTED BY HASH(`id`) BUCKETS 100
PROPERTIES (
"replication_allocation" = "tag.location.default: 3",
"compression" = "ZSTD"
);

INSERT INTO test02(id,batch_dt) VALUES(1,'2023-10-01');
INSERT INTO test01 SELECT * FROM test02;

-- 报错:errCode = 2, detailMessage = (192.168.18.60)[CANCELLED]TStatus: errCode = 2, detailMessage = now range partition only support FunctionCallExpr

2 Answers