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 6650E200D41 for ; Wed, 8 Nov 2017 01:15:33 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 64EA7160C01; Wed, 8 Nov 2017 00:15:33 +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 ABBF6160BED for ; Wed, 8 Nov 2017 01:15:32 +0100 (CET) Received: (qmail 60400 invoked by uid 500); 8 Nov 2017 00:15:31 -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 60388 invoked by uid 99); 8 Nov 2017 00:15:31 -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; Wed, 08 Nov 2017 00:15:31 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 90F43DFF9B; Wed, 8 Nov 2017 00:15:30 +0000 (UTC) From: laurentgo To: dev@drill.apache.org Reply-To: dev@drill.apache.org References: In-Reply-To: Subject: [GitHub] drill pull request #1024: DRILL-3640: Support JDBC Statement.setQueryTimeout... Content-Type: text/plain Message-Id: <20171108001530.90F43DFF9B@git1-us-west.apache.org> Date: Wed, 8 Nov 2017 00:15:30 +0000 (UTC) archived-at: Wed, 08 Nov 2017 00:15:33 -0000 Github user laurentgo commented on a diff in the pull request: https://github.com/apache/drill/pull/1024#discussion_r149542622 --- Diff: exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillCursor.java --- @@ -239,6 +261,11 @@ QueryDataBatch getNext() throws UserException, InterruptedException { } return qdb; } + + // Check and throw SQLTimeoutException + if ( parent.timeoutInMilliseconds > 0 && parent.elapsedTimer.elapsed(TimeUnit.SECONDS) >= parent.timeoutInMilliseconds ) { --- End diff -- wrong unit for the comparison (should be millis) ---