[ 
https://issues.apache.org/jira/browse/DRILL-3640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16124352#comment-16124352
 ] 

ASF GitHub Bot commented on DRILL-3640:
---------------------------------------

Github user parthchandra commented on the issue:

    https://github.com/apache/drill/pull/858
  
    Been looking at this and the first thing that occurs to me is that we are 
not too clear about what the timeout means in the context of ResultSet. The API 
specification is rather silent on that topic. 
    The only reference I could find to this question is this one: 
http://mail-archives.apache.org/mod_mbox/db-derby-dev/200504.mbox/%3c426909ba.1060...@sun.com%3E
    We have the same choices:
     
    
    > 1. setQueryTimeout() only affects Statement.execute()
    > 2.  setQueryTimeout() affects Statement.execute() and 
ResultSet.next(),starting from zero for each invocation
    > 3.  setQueryTimeout() affects Statement.execute() and 
ResultSet.next(),accumulating time spent in each invocation
    
    My own inclination was to select #2 as the appropriate behavior. In fact 
that is what I assumed before I looked at the code. Laurent's suggestion to 
implement the timeout in DrillCursor provides this behavior and is a little bit 
easier to implement.
    
    OTOH, Kunal has chosen #3 as the right behavior. MySQL implements this 
behavior, BTW, so it is not going to be a surprise to end users. And he has 
already done the work. 
    
    I'm +0 on this so far. Let me see if I can get a quick prototype to test 
things out.  



> Drill JDBC driver support Statement.setQueryTimeout(int)
> --------------------------------------------------------
>
>                 Key: DRILL-3640
>                 URL: https://issues.apache.org/jira/browse/DRILL-3640
>             Project: Apache Drill
>          Issue Type: New Feature
>          Components: Client - JDBC
>    Affects Versions: 1.2.0
>            Reporter: Chun Chang
>            Assignee: Kunal Khatua
>             Fix For: 1.12.0
>
>
> It would be nice if we have this implemented. Run away queries can be 
> automatically canceled by setting the timeout. 
> java.sql.SQLFeatureNotSupportedException: Setting network timeout is not 
> supported.
>       at 
> org.apache.drill.jdbc.impl.DrillStatementImpl.setQueryTimeout(DrillStatementImpl.java:152)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to