drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Barclay (Drill) (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (DRILL-2961) Statement.setQueryTimeout() should throw a SQLException
Date Wed, 06 May 2015 22:51:00 GMT

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

Daniel Barclay (Drill) edited comment on DRILL-2961 at 5/6/15 10:50 PM:

Part 1:  

DRILL-2961: Part 1--Prep., Hyg.:  Split DrillStatement -> DrillStatement{,Impl}.
    Preparation for query/network timeout methods:
    - Moved class ...jdbc.DrillStatement to ...jdbc.impl.DrillStatementImpl.
    - Created interface ...jdbc.DrillStatement interface, extending
      java.sql.Statement (for place for Drill-specific narrowed declarations and
      documentation).  Declared DrillStatementImpl to implement new DrillStatement.
    - Updated references.
    - Adjusted visibility (temporarily make somethings publich until DRILL-2089 is
      done more).
    Misc. code hygiene:
    - Purged extraneous imports of ResultSet.
    - Purged TODO made obsolete by UserException.
    - Misc. whitespace.

was (Author: dsbos):
Part 1:  

DRILL-2961: Part 2--Core:  Have set...Timeout methods throw rather than ignore.
Changed implementation of Statement.setQueryTimeout(...) and Connection.setNetworkTimeout(...)
to throw SQLFeatureNotSupportedException rather than silently not setting timeout.
- Added implementations of Statement.{set,get}QueryTimeout(...) and  Connection.{set,get}NetworkTimeout(...)
methods (in classes DrillStatementImpl, DrillConnectionImpl).
- Added Drill-specific narrowed declarations and documentation (in interfaces DrillStatement
and DrillConnection).
- Added unit tests (in new StatementTest, ConnectionTest).

Narrowed other thrown exceptions to allow narrowing in above methods:
- Narrowed exceptions on isClosed() and checkNotClosed() (in DrillConnectionImpl, DrillStatementImpl).
- Added InvalidParameterSqlException.

> Statement.setQueryTimeout() should throw a SQLException
> -------------------------------------------------------
>                 Key: DRILL-2961
>                 URL: https://issues.apache.org/jira/browse/DRILL-2961
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Client - JDBC
>    Affects Versions: 1.0.0
>         Environment: RHEL 6.4
>            Reporter: Kunal Khatua
>            Assignee: Daniel Barclay (Drill)
>             Fix For: 1.0.0
>         Attachments: DRILL-2961.1Prep.2.patch.txt, DRILL-2961.2Core.2.patch.txt
> When trying to set the timeout for a Drill Statement object, Drill does not report any
SQLException which makes the developer incorrectly believe that a timeout has been set. 
> The operation should throw the exception:
> java.sql.SQLException: Method not supported
>         at org.apache.drill.jdbc.DrillStatement.setQueryTimeout(DrillStatement.java)
> ....

This message was sent by Atlassian JIRA

View raw message