Failed to execute an insert statement across the database
- Dominant language
- Java
- Stars
- 2k
- Forks
- 990
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 5
Description
Failed to execute an insert statement across the database.
Steps to reproduce the behavior:
1. Prepare the mysql and postgresql table structures and data.
mysql:
create table t1(c1 int, c2 int);
insert into t1 values (1,1), (2,2);
postgres:
create table t1(c1 int, c2 int);
2. Create mysql and postgresql Plugins in Storage label via http://localhost:8047/storage pages.
3. Execute the following sql statement using sqlline.
Jupiter> insert into pg.public.t1 select c1, c2 from mysql.test.t1;
Error: DATA_READ ERROR: The JDBC storage plugin failed while trying setup the SQL query.
Sql: INSERT INTO `public`.`t1` (`c1`, `c2`)
(SELECT *
FROM `test`.`t1`)
Fragment: 0:0
[Error Id: a5b3ee38-38f5-4945-afda-8a7d4746df4c on DESKTOP-PHHB7LC:31010] (state=,code=0)
4. The execution plan in the log is as follows:
2022-12-19 14:36:32,447 [1c5ffc63-764a-c5ab-4d06-90e658b8e132:foreman] DEBUG o.a.d.e.p.s.h.DefaultSqlHandler - Drill Physical:
00-00 Screen : rowType = RecordType(BIGINT ROWCOUNT): rowcount = 1.0E9, cumulative cost = {1.1E9 rows, 1.1E9 cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 614
00-01 Jdbc(sql=[INSERT INTO `public`.`t1` (`c1`, `c2`)
(SELECT *
FROM `test`.`t1`) ]) : rowType = RecordType(BIGINT ROWCOUNT): rowcount = 1.0E9, cumulative cost = {1.0E9 rows, 1.0E9 cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 604
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.