Github user kkhatua commented on a diff in the pull request:
https://github.com/apache/drill/pull/1024#discussion_r149473521
--- Diff:
exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillResultSetImpl.java ---
@@ -66,11 +70,27 @@
private final DrillConnectionImpl connection;
private volatile boolean hasPendingCancelationNotification = false;
+ private Stopwatch elapsedTimer;
+
+ private int queryTimeoutInSeconds;
+
DrillResultSetImpl(AvaticaStatement statement, Meta.Signature signature,
ResultSetMetaData resultSetMetaData, TimeZone
timeZone,
Meta.Frame firstFrame) {
super(statement, signature, resultSetMetaData, timeZone, firstFrame);
connection = (DrillConnectionImpl) statement.getConnection();
+ try {
+ if (statement.getQueryTimeout() > 0) {
+ queryTimeoutInSeconds = statement.getQueryTimeout();
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
--- End diff --
Guess I was not sure what am I to do if `getQueryTImeout()` threw an
Exception. Didn't want to lose the stack trace. Should I just ignore it?
---