Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 63E5F200B3C for ; Wed, 29 Jun 2016 01:42:16 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 62A68160A6C; Tue, 28 Jun 2016 23:42:16 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CDB71160A56 for ; Wed, 29 Jun 2016 01:42:15 +0200 (CEST) Received: (qmail 7759 invoked by uid 500); 28 Jun 2016 23:42:14 -0000 Mailing-List: contact dev-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list dev@drill.apache.org Received: (qmail 7747 invoked by uid 99); 28 Jun 2016 23:42:14 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jun 2016 23:42:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3818EE08FE; Tue, 28 Jun 2016 23:42:14 +0000 (UTC) From: parthchandra To: dev@drill.apache.org Reply-To: dev@drill.apache.org References: In-Reply-To: Subject: [GitHub] drill pull request #532: DRILL-4732: Update JDBC driver to use the new prepa... Content-Type: text/plain Message-Id: <20160628234214.3818EE08FE@git1-us-west.apache.org> Date: Tue, 28 Jun 2016 23:42:14 +0000 (UTC) archived-at: Tue, 28 Jun 2016 23:42:16 -0000 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 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? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---