当执行insert into a select * from b报错,当把 b这个查询结果拆分后能Insert成功,
具体执行过程和报错如下:
mysql> insert into dwd_t_trace select * from ods_t_traces partition p20241101000000 ;
ERROR 1105 (HY000): errCode = 2, detailMessage = (192.168.8.56)[CANCELLED][E-3113] string column length is too large: total_length=4294967366, element_number=16185623, you can set batch_size a number smaller than 16185623 to avoid this error
0# doris::Exception::Exception(int, std::basic_string_view<char, std::char_traits<char> > const&) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/unique_ptr.h:173
1# doris::Exception::Exception<unsigned long&, unsigned long&, unsigned lo
mysql> select count(1) from ods_t_traces partition p20241101000000 ;
+----------+
| count(1) |
+----------+
| 49964923 |
+----------+
1 row in set (0.43 sec)
mysql> insert into dwd_t_trace select * from ods_t_traces partition p20241101000000 where start_datetime<='2024-11-15 00:00:00'
-> ;
Query OK, 24854137 rows affected (1 min 23.30 sec)
{'label':'label_7f851d8f532e459b_91015696b0f7c2f3', 'status':'VISIBLE', 'txnId':'72591629'}
mysql> insert into dwd_t_trace select * from ods_t_traces partition p20241101000000 where start_datetime>'2024-11-15 00:00:00'
-> ;
Query OK, 25110786 rows affected (1 min 20.08 sec)
{'label':'label_8bd93d539dfc407f_b91198a4934a22b0', 'status':'VISIBLE', 'txnId':'72600579'}
调整batch_size也不好使!
版本 selectdb-doris-2.1.9-rc02-78f37e2d0d