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

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

    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

            People

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

              Dates

                Created:
                Updated:
                Resolved: