[
https://issues.apache.org/jira/browse/DRILL-4732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15353936#comment-15353936
]
ASF GitHub Bot commented on DRILL-4732:
---------------------------------------
Github user parthchandra commented on a diff in the pull request:
https://github.com/apache/drill/pull/532#discussion_r68863584
--- Diff:
exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillConnectionImpl.java ---
@@ -362,12 +364,33 @@ public PreparedStatement prepareStatement(String sql,
int resultSetType,
int resultSetHoldability)
throws SQLException {
throwIfClosed();
try {
- DrillPrepareResult prepareResult = new DrillPrepareResult(sql);
+ DrillRpcFuture<CreatePreparedStatementResp> respFuture =
client.createPreparedStatement(sql);
+
+ CreatePreparedStatementResp resp;
+ try {
+ resp = respFuture.get();
+ } catch (InterruptedException e) {
+ // Preserve evidence that the interruption occurred so that code
higher up
+ // on the call stack can learn of the interruption and respond to
it if it
+ // wants to.
+ Thread.currentThread().interrupt();
+
+ throw new SQLException( "Interrupted", e );
--- End diff --
Since the client connection is still alive, the query would continue to
execute on the server and presumably still send back results. Where are the
results consumed if an interrupt occurs here?
> Update JDBC driver to use the new prepared statement APIs on DrillClient
> ------------------------------------------------------------------------
>
> Key: DRILL-4732
> URL: https://issues.apache.org/jira/browse/DRILL-4732
> Project: Apache Drill
> Issue Type: Sub-task
> Components: Metadata
> Reporter: Venki Korukanti
> Assignee: Venki Korukanti
> Fix For: 1.8.0
>
>
> DRILL-4729 is adding new prepared statement implementation on server side and
> it provides APIs on DrillClient to create new prepared statement which
> returns metadata along with a opaque handle and submit prepared statement for
> execution.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)