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] [Commented] (DRILL-2837) Resolve what Statement.cancel() really should do
Date Tue, 21 Apr 2015 20:00:58 GMT

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

Daniel Barclay (Drill) commented on DRILL-2837:

> It is my belief cancel does not close the statement.

Roger.  (From discussion with someone else I see that cancel() shouldn't close the Statement:
Especially clearly in the case of a PreparedStatement, one would want/expect to be able to
issue a new execution of the SQL statement even after canceling a previous execution.)

> If the statement is executing, I would expect it to throw an exception with a particular

Do you mean that you'd expect the cancel() call to throw some query-canceled exception?  

Or do you mean that you'd expect the cancel() call to cause some other in-progress or future
call (to, say, Statement.execute(...) or ResultSet.next(...)) to throw some query-canceled

> Resolve what Statement.cancel() really should do
> ------------------------------------------------
>                 Key: DRILL-2837
>                 URL: https://issues.apache.org/jira/browse/DRILL-2837
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Client - JDBC
>            Reporter: Daniel Barclay (Drill)
>            Assignee: Daniel Barclay (Drill)
> It is not clear exactly what JDBC's Statement.cancel() method is supposed to do.
> The Javadoc method description for cancel() says only:
> bq. Cancels this Statement object if both the DBMS and driver support aborting an SQL
statement. This method can be used by one thread to cancel a statement that is being executed
by another thread.
> In particular, it's not clear what "cancels this Statement" really means.  (The JDBC
PDF specification doesn't anything about it.)
> &nbsp;
> It seems reasonable to think that calling cancel() on a Statement cancels any associated
query that has not already completed, leaves any associated ResultSet closed, and leaves the
statement closed.
> However, JDBC doesn't actually specify any of that, AvaticaStatement.cancel() does not
close the Statement, and it's not clear whether SQLLine expects the above interpretation or

This message was sent by Atlassian JIRA

View raw message