测试环境:版本:doris-2.1.4-rc02
测试自增主键功能:test_source:637486(60多万数据量),将其插入到test_sink表
----------test_sink 表的建表语句
create table test_sink
(
id bigint not null AUTO_INCREMENT(1),
name string
)
UNIQUE KEY(id)
DISTRIBUTED BY HASH(id) BUCKETS 10;
测试SQL:
INSERT INTO test_sink(name) select name from test_source;
查看报错信息如下:
Reason: column_name[id], null value for not null column, type=BIGINT. src line [];
Reason: column_name[id], null value for not null column, type=BIGINT. src line [];
将上述测试SQL加上 limit 限定,数据正常插入,这个情况怎样解决
INSERT INTO test_sink(name) select name from test_source limit 637486;
mysql> select count(1) from test_sink;
+----------+
| count(1) |
+----------+
| 637486 |
+----------+