[GitHub] [drill] weijunlu commented on issue #2723: Failed to execute an insert statement across the database

2022-12-28 Thread GitBox


weijunlu commented on issue #2723:
URL: https://github.com/apache/drill/issues/2723#issuecomment-1366577871

   2022-12-28 19:03:07,401 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG 
o.a.d.e.p.s.h.DefaultSqlHandler - Drill Plan : 
   {
 "head" : {
   "version" : 1,
   "generator" : {
 "type" : "InsertHandler",
 "info" : ""
   },
   "type" : "APACHE_DRILL_PHYSICAL",
   "options" : [ ],
   "queue" : 0,
   "hasResourcePlan" : false,
   "scannedPluginNames" : [ "mysql", "pg" ],
   "resultMode" : "EXEC"
 },
 "graph" : [ {
   "pop" : "jdbc-scan",
   "@id" : 1,
   "sql" : "INSERT INTO `public`.`t1` (`c1`, `c2`)\r\n(SELECT *\r\nFROM 
`test`.`t1`)",
   "columns" : [ "`ROWCOUNT`" ],
   "config" : {
 "type" : "jdbc",
 "driver" : "com.mysql.jdbc.Driver",
 "url" : "jdbc:mysql://localhost:3316",
 "username" : "root",
 "caseInsensitiveTableNames" : true,
 "writable" : true,
 "authMode" : "SHARED_USER",
 "writerBatchSize" : 1,
 "enabled" : true
   },
   "userName" : "anonymous",
   "cost" : {
 "memoryCost" : 1.6777216E7,
 "outputRowCount" : 1.0E9
   }
 }, {
   "pop" : "screen",
   "@id" : 0,
   "child" : 1,
   "initialAllocation" : 100,
   "maxAllocation" : 100,
   "cost" : {
 "memoryCost" : 1.6777216E7,
 "outputRowCount" : 1.0E9
   }
 } ]
   }
   2022-12-28 19:03:07,402 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG 
o.a.d.e.p.f.SimpleParallelizer - Root fragment:
handle {
 query_id {
   part1: 2041218684968999600
   part2: -1153457303194072660
 }
 major_fragment_id: 0
 minor_fragment_id: 0
   }
   leaf_fragment: true
   assignment {
 address: "DESKTOP-PHHB7LC"
 user_port: 31010
 control_port: 31011
 data_port: 31012
 version: "2.0.0-SNAPSHOT"
 state: STARTUP
   }
   foreman {
 address: "DESKTOP-PHHB7LC"
 user_port: 31010
 control_port: 31011
 data_port: 31012
 version: "2.0.0-SNAPSHOT"
 state: STARTUP
   }
   mem_initial: 100
   mem_max: 100
   credentials {
 user_name: "anonymous"
   }
   context {
 query_start_time: 1672225387214
 time_zone: 299
 default_schema_name: ""
 session_id: "0b3af775-337f-4db3-8ce4-52e20d5c50ee"
   }
   
   2022-12-28 19:03:07,403 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.a.drill.exec.work.foreman.Foreman - PlanFragments for query part1: 
2041218684968999600
   part2: -1153457303194072660

   
   2022-12-28 19:03:07,403 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG 
o.a.d.e.w.f.QueryStateProcessor - 1c53dd94-4277-9ab0-effe-18b1ab8989ac: State 
change requested PLANNING --> ENQUEUED
   2022-12-28 19:03:07,403 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG 
o.a.d.e.w.f.QueryStateProcessor - 1c53dd94-4277-9ab0-effe-18b1ab8989ac: State 
change requested ENQUEUED --> STARTING
   2022-12-28 19:03:07,403 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG 
o.a.d.exec.rpc.control.WorkEventBus - Adding fragment status listener for 
queryId 1c53dd94-4277-9ab0-effe-18b1ab8989ac.
   2022-12-28 19:03:07,403 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG 
o.a.d.e.work.foreman.FragmentsRunner - Submitting fragments to run.
   2022-12-28 19:03:07,403 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG 
o.a.d.exec.ops.FragmentContextImpl - Getting initial memory allocation of 
100
   2022-12-28 19:03:07,403 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG 
o.a.d.exec.ops.FragmentContextImpl - Fragment max allocation: 100
   2022-12-28 19:03:07,403 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG 
o.a.d.e.work.batch.IncomingBuffers - Came up with a list of 0 required 
fragments.  Fragments {}
   2022-12-28 19:03:07,403 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG 
o.a.d.e.work.foreman.FragmentsRunner - Fragments running.
   2022-12-28 19:03:07,403 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG 
o.a.d.e.w.f.QueryStateProcessor - 1c53dd94-4277-9ab0-effe-18b1ab8989ac: State 
change requested STARTING --> RUNNING
   2022-12-28 19:03:07,421 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:frag:0:0] 
DEBUG o.a.d.e.physical.impl.BaseRootExec - BaseRootExec(60762332) operators: 
org.apache.drill.exec.physical.impl.protocol.OperatorRecordBatch 654876346
   2022-12-28 19:03:07,421 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:frag:0:0] 
DEBUG o.a.d.exec.physical.impl.ImplCreator - Took 17 ms to create RecordBatch 
tree
   2022-12-28 19:03:07,421 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:frag:0:0] INFO 
 o.a.d.e.w.fragment.FragmentExecutor - 
1c53dd94-4277-9ab0-effe-18b1ab8989ac:0:0: State change requested 
AWAITING_ALLOCATION --> RUNNING
   2022-12-28 19:03:07,421 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:frag:0:0] INFO 
 o.a.d.e.w.f.FragmentStatusReporter - 1c53dd94-4277-9ab0-effe-18b1ab8989ac:0:0: 

[GitHub] [drill] weijunlu commented on issue #2723: Failed to execute an insert statement across the database

2022-12-28 Thread GitBox


weijunlu commented on issue #2723:
URL: https://github.com/apache/drill/issues/2723#issuecomment-1366576817

   2022-12-28 19:03:07,330 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.apache.calcite.plan.RelOptPlanner - Rule queue:
   rule 
[JdbcTableModificationRule(in:NONE,out:JDBC.mysql)(in:NONE,out:JDBC.mysql)] 
rels [#112]
   rule [JdbcTableModificationRule(in:NONE,out:JDBC.pg)(in:NONE,out:JDBC.pg)] 
rels [#112]
   rule [ExpandConversionRule] rels [#115]
   rule [JDBC_PREL_ConverterJDBC.mysql] rels [#118,#89]
   rule 
[JdbcTableModificationRule(in:NONE,out:JDBC.mysql)(in:LOGICAL,out:JDBC.mysql)] 
rels [#120]
   rule 
[JdbcTableModificationRule(in:NONE,out:JDBC.pg)(in:LOGICAL,out:JDBC.pg)] rels 
[#120]
   2022-12-28 19:03:07,330 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG 
o.apache.calcite.plan.RelOptPlanner - Pop match: rule 
[JdbcTableModificationRule(in:NONE,out:JDBC.mysql)(in:NONE,out:JDBC.mysql)] 
rels [#112]
   2022-12-28 19:03:07,330 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG 
o.apache.calcite.plan.RelOptPlanner - call#202: Apply rule 
[JdbcTableModificationRule(in:NONE,out:JDBC.mysql)(in:NONE,out:JDBC.mysql)] to 
[rel#112:LogicalTableModify]
   2022-12-28 19:03:07,337 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG 
o.apache.calcite.plan.RelOptPlanner - Transform to: rel#121 via 
JdbcTableModificationRule(in:NONE,out:JDBC.mysql)(in:NONE,out:JDBC.mysql)
   2022-12-28 19:03:07,338 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG 
o.apache.calcite.plan.RelOptPlanner - call#202: Full plan for rule input 
[rel#112:LogicalTableModify]: 
   LogicalTableModify(table=[[pg, public, t1]], operation=[INSERT], 
flattened=[true])
 JdbcTableScan(subset=[rel#116:RelSubset#0.NONE.ANY([]).[]], table=[[mysql, 
test, t1]])
   
   2022-12-28 19:03:07,338 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG 
o.apache.calcite.plan.RelOptPlanner - call#202: Rule 
[JdbcTableModificationRule(in:NONE,out:JDBC.mysql)(in:NONE,out:JDBC.mysql)] 
produced [rel#121:JdbcTableModify]
   2022-12-28 19:03:07,338 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG 
o.apache.calcite.plan.RelOptPlanner - call#202: Full plan for 
[rel#121:JdbcTableModify]:
   JdbcTableModify(table=[[pg, public, t1]], operation=[INSERT], 
flattened=[true])
 JdbcTableScan(subset=[rel#109:RelSubset#0.JDBC.mysql.ANY([]).[]], 
table=[[mysql, test, t1]])
   
   2022-12-28 19:03:07,338 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.apache.calcite.plan.RelOptPlanner - Subset cost changed: subset 
[rel#122:RelSubset#2.JDBC.mysql.ANY([]).[]] cost was {inf} now {101.0 rows, 
102.0 cpu, 0.0 io, 0.0 network, 0.0 memory}
   2022-12-28 19:03:07,338 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.apache.calcite.plan.RelOptPlanner - Register 
rel#121:JdbcTableModify.JDBC.mysql.ANY([]).[](input=RelSubset#109,table=[pg, 
public, t1],operation=INSERT,flattened=true) in 
rel#122:RelSubset#2.JDBC.mysql.ANY([]).[]
   2022-12-28 19:03:07,338 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.apache.calcite.plan.RelOptPlanner - Rule-match queued: rule 
[VertexDrelConverterRuleJDBC.mysql(in:JDBC.mysql,out:LOGICAL)] rels [#121]
   2022-12-28 19:03:07,338 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG 
o.apache.calcite.plan.RelOptPlanner - call#202 generated 1 successors: 
[rel#121:JdbcTableModify.JDBC.mysql.ANY([]).[](input=RelSubset#109,table=[pg, 
public, t1],operation=INSERT,flattened=true)]
   2022-12-28 19:03:07,338 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG 
o.apache.calcite.plan.RelOptPlanner - Best cost before rule match: 
{1.0101E10 rows, 2.0101E8 cpu, 1.1E10 io, 0.0 network, 0.0 
memory}
   2022-12-28 19:03:07,339 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.apache.calcite.plan.RelOptPlanner - Root: 
rel#114:RelSubset#2.LOGICAL.ANY([]).[]
   Original rel:
   DrillTableModify(subset=[rel#114:RelSubset#2.LOGICAL.ANY([]).[]], 
table=[[pg, public, t1]], operation=[INSERT], flattened=[true]): rowcount = 
1.0E9, cumulative cost = {1.0E10 rows, 0.0 cpu, 1.1E10 io, 0.0 network, 
0.0 memory}, id = 120
 VertexDrel(subset=[rel#119:RelSubset#0.LOGICAL.ANY([]).[]]): rowcount = 
1.0E9, cumulative cost = {1.0E8 rows, 2.0E8 cpu, 0.0 io, 0.0 network, 0.0 
memory}, id = 118
   JdbcTableScan(subset=[rel#109:RelSubset#0.JDBC.mysql.ANY([]).[]], 
table=[[mysql, test, t1]]): rowcount = 1.0E9, cumulative cost = {100.0 rows, 
101.0 cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 89
   
   Sets:
   Set#0, type: RecordType(INTEGER c1, INTEGER c2)
rel#109:RelSubset#0.JDBC.mysql.ANY([]).[], best=rel#89
rel#89:JdbcTableScan.JDBC.mysql.ANY([]).[](table=[mysql, test, 
t1]), rowcount=1.0E9, cumulative cost={100.0 rows, 101.0 cpu, 0.0 io, 0.0 
network, 0.0 memory}
rel#116:RelSubset#0.NONE.ANY([]).[], best=null
rel#119:RelSubset#0.LOGICAL.ANY([]).[], best=rel#118
rel#118:VertexDrel.LOGICAL.ANY([]).[](input=RelSubset#109), 

[GitHub] [drill] weijunlu commented on issue #2723: Failed to execute an insert statement across the database

2022-12-28 Thread GitBox


weijunlu commented on issue #2723:
URL: https://github.com/apache/drill/issues/2723#issuecomment-1366575973

   2022-12-28 19:03:07,204 [main] DEBUG o.a.d.j.impl.DrillStatementRegistry - 
Adding to open-statements registry: 
org.apache.drill.jdbc.impl.DrillStatementImpl@71df3d2b
   2022-12-28 19:03:07,204 [main] DEBUG o.a.d.j.i.DrillCursor$ResultsListener - 
[#2] Query listener created.
   2022-12-28 19:03:07,204 [main] DEBUG o.apache.drill.jdbc.impl.DrillCursor - 
Setting timeout as 0
   2022-12-28 19:03:07,206 [UserServer-1] DEBUG 
o.a.d.e.r.u.UserServerRequestHandler - Received query to run.  Returning query 
handle.
   2022-12-28 19:03:07,215 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG 
o.a.d.e.w.f.QueryStateProcessor - 1c53dd94-4277-9ab0-effe-18b1ab8989ac: State 
change requested PREPARING --> PLANNING
   2022-12-28 19:03:07,215 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] INFO  
o.a.drill.exec.work.foreman.Foreman - Query text for query with id 
1c53dd94-4277-9ab0-effe-18b1ab8989ac issued by anonymous: insert into 
pg.public.t1 select c1, c2 from mysql.test.t1
   2022-12-28 19:03:07,215 [Client-1] DEBUG 
o.a.d.j.i.DrillCursor$ResultsListener - [#2] Received query ID: 
1c53dd94-4277-9ab0-effe-18b1ab8989ac.
   2022-12-28 19:03:07,215 [Client-1] DEBUG o.a.d.e.rpc.user.QueryResultHandler 
- Received QueryId 1c53dd94-4277-9ab0-effe-18b1ab8989ac successfully. Adding 
results listener 
org.apache.drill.jdbc.impl.DrillCursor$ResultsListener@29741514.
   2022-12-28 19:03:07,222 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
org.apache.calcite.sql.parser - After unconditional rewrite: INSERT INTO 
`pg`.`public`.`t1`
   (SELECT `c1`, `c2`
   FROM `mysql`.`test`.`t1`)
   2022-12-28 19:03:07,308 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
org.apache.calcite.sql.parser - After validation: INSERT INTO `pg`.`public`.`t1`
   (SELECT `t1`.`c1`, `t1`.`c2`
   FROM `mysql`.`test`.`t1` AS `t1`)
   2022-12-28 19:03:07,308 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.a.c.sql.pretty.SqlPrettyWriter - Token is 'INSERT INTO'; result is false
   2022-12-28 19:03:07,309 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.a.c.sql.pretty.SqlPrettyWriter - Token is 'pg'; result is false
   2022-12-28 19:03:07,309 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.a.c.sql.pretty.SqlPrettyWriter - Token is '.'; result is false
   2022-12-28 19:03:07,309 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.a.c.sql.pretty.SqlPrettyWriter - Token is 'public'; result is false
   2022-12-28 19:03:07,309 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.a.c.sql.pretty.SqlPrettyWriter - Token is '.'; result is false
   2022-12-28 19:03:07,309 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.a.c.sql.pretty.SqlPrettyWriter - Token is 't1'; result is false
   2022-12-28 19:03:07,309 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.a.c.sql.pretty.SqlPrettyWriter - Token is ''; result is false
   2022-12-28 19:03:07,309 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.a.c.sql.pretty.SqlPrettyWriter - Token is '('; result is false
   2022-12-28 19:03:07,309 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.a.c.sql.pretty.SqlPrettyWriter - Token is 'SELECT'; result is false
   2022-12-28 19:03:07,309 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.a.c.sql.pretty.SqlPrettyWriter - Token is 't1'; result is false
   2022-12-28 19:03:07,309 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.a.c.sql.pretty.SqlPrettyWriter - Token is '.'; result is false
   2022-12-28 19:03:07,309 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.a.c.sql.pretty.SqlPrettyWriter - Token is 'c1'; result is false
   2022-12-28 19:03:07,309 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.a.c.sql.pretty.SqlPrettyWriter - Token is ''; result is false
   2022-12-28 19:03:07,309 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.a.c.sql.pretty.SqlPrettyWriter - Token is ','; result is false
   2022-12-28 19:03:07,309 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.a.c.sql.pretty.SqlPrettyWriter - Token is 't1'; result is false
   2022-12-28 19:03:07,309 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.a.c.sql.pretty.SqlPrettyWriter - Token is '.'; result is false
   2022-12-28 19:03:07,309 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.a.c.sql.pretty.SqlPrettyWriter - Token is 'c2'; result is false
   2022-12-28 19:03:07,309 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.a.c.sql.pretty.SqlPrettyWriter - Token is ''; result is false
   2022-12-28 19:03:07,309 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.a.c.sql.pretty.SqlPrettyWriter - Token is ''; result is false
   2022-12-28 19:03:07,309 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 
o.a.c.sql.pretty.SqlPrettyWriter - Token is 'FROM'; result is false
   2022-12-28 19:03:07,309 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE 

[GitHub] [drill] weijunlu commented on issue #2723: Failed to execute an insert statement across the database

2022-12-28 Thread GitBox


weijunlu commented on issue #2723:
URL: https://github.com/apache/drill/issues/2723#issuecomment-1366570466

   I opened the trace log, included the calcite log.
   Log configurations are as follows:
 
   
   
 
   
   
   
   
 
   
 
   
   
   
 
   
 
 
   
   
 


-- 
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

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



[GitHub] [drill] weijunlu commented on issue #2723: Failed to execute an insert statement across the database

2022-12-22 Thread GitBox


weijunlu commented on issue #2723:
URL: https://github.com/apache/drill/issues/2723#issuecomment-1363564470

   @cgivre yes, I used the master version.
   apache drill> select version,  commit_message, commit_time from sys.version;
   
++--+---+
   |version |  commit_message   
   |commit_time|
   
++--+---+
   | 2.0.0-SNAPSHOT | DRILL-8314: Add support for automatically retrying and 
disabling broken storage plugins (#2655) | 18.10.2022 @ 18:15:31 CST |


-- 
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

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