[
https://issues.apache.org/jira/browse/DRILL-4732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15412480#comment-15412480
]
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_r73955782
--- 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 --
By process the message, I wanted to understand who pulls the message off
the socket and, if there is no listener, discards it. Looks like there is
always a listener.
> 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)