Uploaded image for project: 'Zeppelin'
  1. Zeppelin
  2. ZEPPELIN-2833

JDBC Interpreter doesn't follow JDBC specification when getting the results.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.8.0
    • Interpreters
    • None

    Description

      According to the documentation for ResultSet#next:

      When a call to the next method returns false, the cursor is positioned after the last row. Any invocation of a ResultSet method which requires a current row will result in a SQLException being thrown. If the result set type is TYPE_FORWARD_ONLY, it is vendor specified whether their JDBC driver implementation *will return false or throw an SQLException on a subsequent call to next.*
      

      In JDBCInterpreter getResults method is iterating till it reaches the max limit or next() returns false.
      In executeSql that calls getResults the next() method is called again. According to the JDBC specification this may produce SQL Exception if end of the result set is already reached.
      That may be reproducible with Apache Phoenix 4.7+ jdbc driver.

      Attachments

        1. ZEPPELIN-2833-1.patch
          3 kB
          Sergey Soldatov

        Activity

          People

            sergey.soldatov Sergey Soldatov
            sergey.soldatov Sergey Soldatov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: