Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-2837

Resolve what Statement.cancel() really should do

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.2.0
    • Client - JDBC
    • None

    Description

      It is not clear exactly what JDBC's Statement.cancel() method is supposed to do.

      The Javadoc method description for cancel() says only:

      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.)

       
      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 not.

      Attachments

        Issue Links

          Activity

            People

              dsbos Daniel Barclay
              dsbos Daniel Barclay
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: