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

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 0.13.0
    • Fix Version/s: 2.0.0
    • Component/s: None
    • Labels:
    • Hadoop Flags:
      Incompatible change
    • Release Note:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: