Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-612

Update AvaticaStatement to handle cancelled queries

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.0-incubating
    • Component/s: None
    • Labels:
      None

      Description

      Once the application cancels a query, the cursor corresponding to the result set is set back to null and any attempt to get the results results in a NPE.
      AvaticaStatement:internalExecute and AvaticaResultSet:next should check the state of the cursor and return false.

      1. CALCITE-612.2.patch.diff
        1 kB
        Parth Chandra
      2. CALCITE-612.patch.diff
        2 kB
        Parth Chandra

        Issue Links

          Activity

          Hide
          julianhyde Julian Hyde added a comment -

          Closing now that 1.1.0-incubating has been released.

          Show
          julianhyde Julian Hyde added a comment - Closing now that 1.1.0-incubating has been released.
          Hide
          julianhyde Julian Hyde added a comment -
          Show
          julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/469e5fc1 . Thanks for the patch!
          Hide
          parthc Parth Chandra added a comment -

          Updated patch. Looks like master already addressed the issue in AvaticaResultSet. The patch now includes an update only for AvaticaStatement.

          Show
          parthc Parth Chandra added a comment - Updated patch. Looks like master already addressed the issue in AvaticaResultSet. The patch now includes an update only for AvaticaStatement.
          Hide
          julianhyde Julian Hyde added a comment -

          Can you rebase the patch to the latest master? The package name is now org.apache.calcite.avatica not net.hydromatic.avatica.

          Show
          julianhyde Julian Hyde added a comment - Can you rebase the patch to the latest master? The package name is now org.apache.calcite.avatica not net.hydromatic.avatica.
          Hide
          parthc Parth Chandra added a comment -

          Attaching patch to check if cursor is null before it is accessed

          Show
          parthc Parth Chandra added a comment - Attaching patch to check if cursor is null before it is accessed

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              parthc Parth Chandra
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development