You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Khurram Faraaz (JIRA)" <ji...@apache.org> on 2018/10/30 07:15:00 UTC
[jira] [Created] (DRILL-6816) NPE - Concurrent query execution
using PreparedStatement
Khurram Faraaz created DRILL-6816:
-------------------------------------
Summary: NPE - Concurrent query execution using PreparedStatement
Key: DRILL-6816
URL: https://issues.apache.org/jira/browse/DRILL-6816
Project: Apache Drill
Issue Type: Bug
Affects Versions: 1.14.0
Reporter: Khurram Faraaz
Concurrent query execution from JDBC program using PreparedStatement results in NPE.
Queries that were executed concurrently are (part of a query file),
{noformat}
select id from `test_tbl.json`
select count(id) from `test_tbl.json`
select count(*) from `test_tbl.json`
select * from `test_tbl.json`
{noformat}
Drill 1.14.0
git.commit.id=35a1ae23c9b280b9e73cb0f6f01808c996515454
MapR version => 6.1.0.20180911143226.GA (secure cluster)
Executing the above queries concurrently using a Statement object results in successful query execution.
{noformat}
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(query);
{noformat}
However, when the same queries listed above are executed using a PreparedStatement object we see an NPE
{noformat}
PreparedStatement prdstmnt = conn.prepareStatement(query);
prdstmnt.executeUpdate();
{noformat}
Stack trace from drillbit.log
{noformat}
java.lang.NullPointerException
at java.util.Objects.requireNonNull(Objects.java:203)
at org.apache.calcite.avatica.Meta$MetaResultSet.create(Meta.java:577)
at org.apache.drill.jdbc.impl.DrillMetaImpl.execute(DrillMetaImpl.java:1143)
at org.apache.drill.jdbc.impl.DrillMetaImpl.execute(DrillMetaImpl.java:1150)
at org.apache.calcite.avatica.AvaticaConnection.executeQueryInternal(AvaticaConnection.java:511)
at org.apache.calcite.avatica.AvaticaPreparedStatement.executeLargeUpdate(AvaticaPreparedStatement.java:146)
at org.apache.drill.jdbc.impl.DrillPreparedStatementImpl.executeLargeUpdate(DrillPreparedStatementImpl.java:512)
at org.apache.calcite.avatica.AvaticaPreparedStatement.executeUpdate(AvaticaPreparedStatement.java:142)
at RunQuery.executeQuery(RunQuery.java:61)
at RunQuery.run(RunQuery.java:30)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
{noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)