Github user kkhatua commented on a diff in the pull request:
https://github.com/apache/drill/pull/1024#discussion_r149547712
--- Diff:
exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillResultSetImpl.java ---
@@ -96,6 +105,14 @@ private void throwIfClosed() throws
AlreadyClosedSqlException,
throw new AlreadyClosedSqlException( "ResultSet is already
closed." );
}
}
+
+ //Implicit check for whether timeout is set
+ if (elapsedTimer != null) {
--- End diff --
I was originally wondering as to when should we trigger the countdown on
the timer.
Creating a `[Prepared]Statement` object should not be the basis for the
starting the clock, but only when you actually call execute(). The
`DrillCursor` is initialized in this method and is what starts the clock.
I could create a clone of the `testTriggeredQueryTimeout` method and simply
have the client pause after `execute()` but before fetching the `ResultSet`
instance or invoking `ResultSet.next()` . Would that work ?
---