【已记录】insert into select夸集群迁移数据报错Unsupported type 'UNSUPPORTED_TYPE'

Viewed 40

版本:2.0.9

通过catalog将一个doris集群(版本1.2.7)数据迁移到另外一个集群(版本2.0.9),sql如下:

insert into iot.test select * from doris_catalog.iot.test where pt <= '20240611';

报错如下:

Execution failed: Error Failed to execute sql: java.sql.SQLException: (conn=19554) errCode = 2, detailMessage = Unsupported type 'UNSUPPORTED_TYPE' in '`doris_catalog`.`default_cluster:iot`.`test`.`metric`'.

metric是个json字段(1.2.7是jsonb类型,2.0.9是json类型)

1.2.7建表语句

CREATE TABLE `test` (
  `pt` date NULL COMMENT '分区',
  `device_id` varchar(128) NULL COMMENT '设备ID',
  `metric` jsonb NULL COMMENT '指标'
) 
DUPLICATE KEY(`pt`, `device_id`)
DISTRIBUTED BY HASH(`device_id`) BUCKETS 1 PROPERTIES (
  "replication_allocation" = "tag.location.default: 3"
);

2.0.9建表语句

CREATE TABLE `test` (
  `pt` date NULL COMMENT '分区',
  `device_id` varchar(128) NULL COMMENT '设备ID',
  `metric` json NULL COMMENT '指标'
) 
DUPLICATE KEY(`pt`, `device_id`)
DISTRIBUTED BY HASH(`device_id`) BUCKETS 1 PROPERTIES (
  "replication_allocation" = "tag.location.default: 3"
);
1 Answers

【问题状态】已解决
【问题处理】正在处理中,这个类型转换有一些问题,我们这边会修一下,https://github.com/apache/doris/pull/36179 ,着急的话可以加我的微信Faith_xzc