weijunlu opened a new issue, #2723:
URL: https://github.com/apache/drill/issues/2723

   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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@drill.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to