drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From laurentgo <...@git.apache.org>
Subject [GitHub] drill pull request #1024: DRILL-3640: Support JDBC Statement.setQueryTimeout...
Date Tue, 07 Nov 2017 19:23:33 GMT
Github user laurentgo commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1024#discussion_r149476740
  
    --- 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 --
    
    I think so


---

Mime
View raw message