Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-11501

HiveConnection.readOnly always throws a "Method not supported" exception

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0
    • None
    • None

    Description

      HiveConnection.setReadOnly's automatically generated implementation always throws a generic "Method not supported" exception and thus is not compliant with the JDBC spec. Per JDBC spec, an exception can be thrown only if the connection is closed, DB access error occurs or the method is called during a transaction (which is not a case for HiveConnection).

      JDBC spec does not say a word about not supporting the method by the driver. The most correct behavior could be to throw only if the request tries to enable the read-only mode (as HiveConnection.isReadOnly always returns false).

      This issue is a blocker for JDBC connection pools (i.e. HikariCP) that expect JDBC-compliant behavior from the driver.

      Attachments

        1. HIVE-11501.patch
          2 kB
          Michał Węgrzyn

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mwegrz Michał Węgrzyn Assign to me
            mwegrz Michał Węgrzyn
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment