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

HS2 JDBC driver is inconsistent w.r.t. auto commit

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: Resolved
    • Major
    • Resolution: Duplicate
    • 0.13.0
    • 2.0.0
    • None
    • Incompatible change
    • Hide
      Changes the behavior of setAutoCommit to allow setAutoCommit(true) to succeed silently and setAutoCommit(false) to throw an exception and fail, as all Hive transactions automatically commit and hive does not yet support manual transactions (see https://cwiki.apache.org/confluence/display/Hive/Hive+Transactions#HiveTransactions-Limitations).
      Show
      Changes the behavior of setAutoCommit to allow setAutoCommit(true) to succeed silently and setAutoCommit(false) to throw an exception and fail, as all Hive transactions automatically commit and hive does not yet support manual transactions (see https://cwiki.apache.org/confluence/display/Hive/Hive+Transactions#HiveTransactions-Limitations) .

    Description

      I see an inconsistency in HS2 JDBC driver code:

        @Override
        public void setAutoCommit(boolean autoCommit) throws SQLException {
          if (autoCommit) {
            throw new SQLException("enabling autocommit is not supported");
          }
        }
      

      From above, it seems that auto commit is not supported. However,

        @Override
        public boolean getAutoCommit() throws SQLException {
          return true;
        }
      

      Attachments

        1. HIVE-6712.patch
          1 kB
          David McWhorter

        Issue Links

        Activity

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

          People

            dmcwhorter David McWhorter Assign to me
            xuefuz Xuefu Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment