New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to execute an insert statement across the database #2723
Comments
What version of Drill are you using? INSERT was only recently merged and is not part of any official release yet. So unless you are using the latest master, this won't work. |
@cgivre yes, I used the master version. |
Can you please enable verbose logging and post the stack trace? Without that, we really can't debug this. |
I opened the trace log, included the calcite log. |
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,316 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.a.d.e.p.s.h.DefaultSqlHandler - INITIAL: 2022-12-28 19:03:07,317 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner -
2022-12-28 19:03:07,318 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - For final plan, using rel#95:LogicalTableModify.NONE.ANY([]).[](input=HepRelVertex#94,table=[pg, public, t1],operation=INSERT,flattened=true) 2022-12-28 19:03:07,319 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner -
2022-12-28 19:03:07,319 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - For final plan, using rel#100:LogicalTableModify.NONE.ANY([]).[](input=HepRelVertex#99,table=[pg, public, t1],operation=INSERT,flattened=true) 2022-12-28 19:03:07,321 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner -
2022-12-28 19:03:07,322 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - For final plan, using rel#107:LogicalTableModify.NONE.ANY([]).[](input=HepRelVertex#106,table=[pg, public, t1],operation=INSERT,flattened=true) 2022-12-28 19:03:07,323 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner - Subset cost changed: subset [rel#109:RelSubset#0.JDBC.mysql.ANY([]).[]] cost was {inf} now {100.0 rows, 101.0 cpu, 0.0 io, 0.0 network, 0.0 memory} Sets: Graphviz: 2022-12-28 19:03:07,327 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#169: Rule [ProjectRemoveRule] produced [rel#116:RelSubset] 2022-12-28 19:03:07,327 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner - Merge set#1 into set#0 Sets: Graphviz: 2022-12-28 19:03:07,328 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#165: Rule [VertexDrelConverterRuleJDBC.mysql(in:JDBC.mysql,out:LOGICAL)] produced [rel#117:VertexDrel] 2022-12-28 19:03:07,328 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner - Subset cost changed: subset [rel#119:RelSubset#0.LOGICAL.ANY([]).[]] cost was {inf} now {1.000001E8 rows, 2.00000101E8 cpu, 0.0 io, 0.0 network, 0.0 memory} Sets: Graphviz: 2022-12-28 19:03:07,329 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#198: Rule [DrillTableModifyRule] produced [rel#120:DrillTableModify] 2022-12-28 19:03:07,330 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner - Subset cost changed: subset [rel#114:RelSubset#2.LOGICAL.ANY([]).[]] cost was {inf} now {1.01000001E10 rows, 2.00000101E8 cpu, 1.000000001E10 io, 0.0 network, 0.0 memory} Sets: Graphviz: |
2022-12-28 19:03:07,330 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner - Rule queue: 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] 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} Sets: Graphviz: 2022-12-28 19:03:07,339 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#204: Rule [JdbcTableModificationRule(in:NONE,out:JDBC.pg)(in:NONE,out:JDBC.pg)] produced [rel#124:JdbcTableModify] 2022-12-28 19:03:07,339 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner - Register rel#124:JdbcTableModify.JDBC.pg.ANY([]).[](input=RelSubset#123,table=[pg, public, t1],operation=INSERT,flattened=true) in rel#125:RelSubset#2.JDBC.pg.ANY([]).[] Sets: Graphviz: Sets: Graphviz: 2022-12-28 19:03:07,341 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#223: Full plan for rule input [rel#89:JdbcTableScan]: 2022-12-28 19:03:07,341 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#223: Rule [JDBC_PREL_ConverterJDBC.mysql] produced [rel#126:JdbcIntermediatePrel] 2022-12-28 19:03:07,341 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner - Register rel#128:AbstractConverter.JDBC.mysql.ANY([]). in rel#109:RelSubset#0.JDBC.mysql.ANY([]).[] Sets: Graphviz: 2022-12-28 19:03:07,342 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#230: Rule [JdbcTableModificationRule(in:NONE,out:JDBC.mysql)(in:LOGICAL,out:JDBC.mysql)] produced [rel#131:JdbcTableModify] 2022-12-28 19:03:07,342 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner - Register: rel#131 is equivalent to rel#121:JdbcTableModify.JDBC.mysql.ANY([]).[](input=RelSubset#109,table=[pg, public, t1],operation=INSERT,flattened=true) Sets: Graphviz: 2022-12-28 19:03:07,343 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#232: Rule [JdbcTableModificationRule(in:NONE,out:JDBC.pg)(in:LOGICAL,out:JDBC.pg)] produced [rel#132:JdbcTableModify] 2022-12-28 19:03:07,343 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner - Register: rel#132 is equivalent to rel#124:JdbcTableModify.JDBC.pg.ANY([]).[](input=RelSubset#123,table=[pg, public, t1],operation=INSERT,flattened=true) Sets: Graphviz: 2022-12-28 19:03:07,345 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#239: Rule [VertexDrelConverterRuleJDBC.mysql(in:JDBC.mysql,out:LOGICAL)] produced [rel#133:VertexDrel] 2022-12-28 19:03:07,345 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner - Subset cost changed: subset [rel#114:RelSubset#2.LOGICAL.ANY([]).[]] cost was {1.01000001E10 rows, 2.00000101E8 cpu, 1.000000001E10 io, 0.0 network, 0.0 memory} now {1.00000101E8 rows, 1.00000102E8 cpu, 0.0 io, 0.0 network, 0.0 memory} Sets: Graphviz: 2022-12-28 19:03:07,346 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#246: Rule [VertexDrelConverterRuleJDBC.pg(in:JDBC.pg,out:LOGICAL)] produced [rel#135:VertexDrel] 2022-12-28 19:03:07,346 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner - Register rel#136:VertexDrel.LOGICAL.ANY([]). in rel#114:RelSubset#2.LOGICAL.ANY([]).[] Sets: Graphviz: Sets: Graphviz: 2022-12-28 19:03:07,347 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#254: Full plan for rule input [rel#128:AbstractConverter]: 2022-12-28 19:03:07,347 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#254: Rule [JDBC_PREL_ConverterJDBC.mysql] produced [rel#137:JdbcIntermediatePrel] 2022-12-28 19:03:07,347 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner - Register: rel#137 is equivalent to rel#126:JdbcIntermediatePrel.PHYSICAL.SINGLETON([]). Sets: Graphviz: 2022-12-28 19:03:07,348 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#256: Rule [VertexDrelConverterRuleJDBC.mysql(in:JDBC.mysql,out:LOGICAL)] produced [rel#138:VertexDrel] 2022-12-28 19:03:07,348 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner - Register: rel#139 is equivalent to rel#118:VertexDrel.LOGICAL.ANY([]). Sets: Graphviz: Sets: Graphviz: |
2022-12-28 19:03:07,350 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner - Rule queue: Sets: Graphviz: 2022-12-28 19:03:07,351 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#271: Rule [VertexDrelConverterRuleJDBC.pg(in:JDBC.pg,out:LOGICAL)] produced [rel#140:VertexDrel] 2022-12-28 19:03:07,351 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner - Register rel#141:VertexDrel.LOGICAL.ANY([]). in rel#119:RelSubset#0.LOGICAL.ANY([]).[] Sets: Graphviz: 2022-12-28 19:03:07,351 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#281: Full plan for rule input [rel#121:JdbcTableModify]: 2022-12-28 19:03:07,351 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#281: Rule [JDBC_PREL_ConverterJDBC.mysql] produced [rel#142:JdbcIntermediatePrel] 2022-12-28 19:03:07,352 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner - Register rel#144:AbstractConverter.LOGICAL.ANY([]). in rel#114:RelSubset#2.LOGICAL.ANY([]).[] Sets: Graphviz: 2022-12-28 19:03:07,353 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#289: Full plan for rule input [rel#124:JdbcTableModify]: 2022-12-28 19:03:07,353 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#289: Rule [JDBC_PREL_ConverterJDBC.pg] produced [rel#145:JdbcIntermediatePrel] 2022-12-28 19:03:07,353 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner - Register rel#145:JdbcIntermediatePrel.PHYSICAL.SINGLETON([]). in rel#143:RelSubset#2.PHYSICAL.SINGLETON([]).[] Sets: Graphviz: 2022-12-28 19:03:07,353 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#296: Full plan for rule input [rel#130:AbstractConverter]: 2022-12-28 19:03:07,353 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#296: Rule [JDBC_PREL_ConverterJDBC.pg] produced [rel#146:JdbcIntermediatePrel] 2022-12-28 19:03:07,354 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner - Register rel#146:JdbcIntermediatePrel.PHYSICAL.SINGLETON([]). in rel#127:RelSubset#0.PHYSICAL.SINGLETON([]).[] Sets: Graphviz: Sets: Graphviz: Sets: Graphviz:
2022-12-28 19:03:07,356 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - Cheapest plan: 2022-12-28 19:03:07,356 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - Provenance: 2022-12-28 19:03:07,356 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.a.d.e.p.s.h.DefaultSqlHandler - VOLCANO:Logical Planning (no pruning or join). (34ms): 2022-12-28 19:03:07,357 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner -
2022-12-28 19:03:07,357 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - For final plan, using rel#152:VertexDrel.LOGICAL.ANY([]). 2022-12-28 19:03:07,360 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner -
2022-12-28 19:03:07,360 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - For final plan, using rel#157:VertexDrel.LOGICAL.ANY([]). 2022-12-28 19:03:07,362 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner -
2022-12-28 19:03:07,362 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - For final plan, using rel#162:VertexDrel.LOGICAL.ANY([]). 2022-12-28 19:03:07,364 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner -
2022-12-28 19:03:07,364 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - For final plan, using rel#167:VertexDrel.LOGICAL.ANY([]). 2022-12-28 19:03:07,366 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner -
2022-12-28 19:03:07,366 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - For final plan, using rel#172:VertexDrel.LOGICAL.ANY([]). 2022-12-28 19:03:07,368 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner - Subset cost changed: subset [rel#175:RelSubset#3.JDBC.mysql.ANY([]).[]] cost was {inf} now {100.0 rows, 101.0 cpu, 0.0 io, 0.0 network, 0.0 memory} Sets: Graphviz: 2022-12-28 19:03:07,370 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#327: Rule [VertexDrelConverterRuleJDBC.mysql(in:JDBC.mysql,out:LOGICAL)] produced [rel#183:VertexDrel] 2022-12-28 19:03:07,370 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner - Subset cost changed: subset [rel#185:RelSubset#3.LOGICAL.ANY([]).[]] cost was {inf} now {1.000001E8 rows, 2.00000101E8 cpu, 0.0 io, 0.0 network, 0.0 memory} Sets: Graphviz: 2022-12-28 19:03:07,371 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#340: Rule [VertexDrelConverterRuleJDBC.mysql(in:JDBC.mysql,out:LOGICAL)] produced [rel#186:VertexDrel] 2022-12-28 19:03:07,371 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner - Register: rel#187 is equivalent to rel#178:VertexDrel.LOGICAL.ANY([]). Sets: Graphviz: 2022-12-28 19:03:07,372 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#353: Full plan for rule input [rel#176:JdbcTableModify]: 2022-12-28 19:03:07,372 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#353: Rule [JDBC_PREL_ConverterJDBC.mysql] produced [rel#189:JdbcIntermediatePrel] 2022-12-28 19:03:07,372 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner - Subset cost changed: subset [rel#190:RelSubset#4.PHYSICAL.SINGLETON([]).[]] cost was {inf} now {1.000000101E9 rows, 1.000000102E9 cpu, 0.0 io, 0.0 network, 0.0 memory} Sets: Graphviz: 2022-12-28 19:03:07,372 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#357: Full plan for rule input [rel#178:VertexDrel]: 2022-12-28 19:03:07,372 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#357: Rule [Prel.ScreenPrule] produced [rel#191:ScreenPrel] 2022-12-28 19:03:07,373 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner - Subset cost changed: subset [rel#182:RelSubset#6.PHYSICAL.SINGLETON([]).[]] cost was {inf} now {1.100000101E9 rows, 1.100000102E9 cpu, 0.0 io, 0.0 network, 0.0 memory} Sets: Graphviz: 2022-12-28 19:03:07,373 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#380: Full plan for rule input [rel#89:JdbcTableScan]: 2022-12-28 19:03:07,373 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - call#380: Rule [JDBC_PREL_ConverterJDBC.mysql] produced [rel#192:JdbcIntermediatePrel] 2022-12-28 19:03:07,373 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner - Subset cost changed: subset [rel#193:RelSubset#3.PHYSICAL.SINGLETON([]).[]] cost was {inf} now {1.0000001E9 rows, 1.000000101E9 cpu, 0.0 io, 0.0 network, 0.0 memory} Sets: Graphviz: Sets: Graphviz:
2022-12-28 19:03:07,375 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - Cheapest plan: 2022-12-28 19:03:07,375 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - Provenance: 2022-12-28 19:03:07,391 [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,393 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.a.d.e.p.s.h.DefaultSqlHandler - Physical RelNode after Top and Rename Project inserting: : 2022-12-28 19:03:07,394 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] TRACE o.apache.calcite.plan.RelOptPlanner -
2022-12-28 19:03:07,394 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.apache.calcite.plan.RelOptPlanner - For final plan, using rel#205:ScreenPrel.PHYSICAL.SINGLETON([]). 2022-12-28 19:03:07,394 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.a.d.e.p.s.h.DefaultSqlHandler - Drill Physical: |
2022-12-28 19:03:07,401 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:foreman] DEBUG o.a.d.e.p.s.h.DefaultSqlHandler - Drill Plan : 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 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,421 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:frag:0:0] DEBUG o.a.d.e.w.fragment.FragmentExecutor - Starting fragment 0:0 on DESKTOP-PHHB7LC:31010 Sql: INSERT INTO [Error Id: 160a04a4-caff-42ae-ac68-06669b926853 ] 2022-12-28 19:03:07,469 [1c53dd94-4277-9ab0-effe-18b1ab8989ac:frag:0:0] DEBUG o.a.d.e.w.f.QueryStateProcessor - 1c53dd94-4277-9ab0-effe-18b1ab8989ac: State change requested RUNNING --> FAILED 2022-12-28 19:03:07,476 [Client-1] DEBUG o.a.d.e.rpc.user.QueryResultHandler - resultArrived: queryState: FAILED, queryId = 1c53dd94-4277-9ab0-effe-18b1ab8989ac Sql: INSERT INTO [Error Id: 160a04a4-caff-42ae-ac68-06669b926853 on DESKTOP-PHHB7LC:31010] Sql: INSERT INTO [Error Id: 160a04a4-caff-42ae-ac68-06669b926853 on DESKTOP-PHHB7LC:31010] Sql: INSERT INTO [Error Id: 160a04a4-caff-42ae-ac68-06669b926853 on DESKTOP-PHHB7LC:31010] |
Failed to execute an insert statement across the database.
Steps to reproduce the behavior:
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);
Create mysql and postgresql Plugins in Storage label via http://localhost:8047/storage pages.
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)
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 = 604The text was updated successfully, but these errors were encountered: