This is an automated email from the ASF dual-hosted git repository.

chengpan pushed a commit to branch branch-1.10
in repository https://gitbox.apache.org/repos/asf/kyuubi.git


The following commit(s) were added to refs/heads/branch-1.10 by this push:
     new 460e19360f Revert "[KYUUBI #6639] Port HIVE-27815: Support update 
numModifiedRows"
460e19360f is described below

commit 460e19360f6961e545a313b88f06dbe648322ef1
Author: Cheng Pan <[email protected]>
AuthorDate: Fri Nov 29 00:43:46 2024 +0800

    Revert "[KYUUBI #6639] Port HIVE-27815: Support update numModifiedRows"
    
    This reverts commit 2d883e7cac6e72f7792dabf69a2bb099df15b210.
---
 .../org/apache/kyuubi/jdbc/hive/KyuubiStatement.java   | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

diff --git 
a/kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/KyuubiStatement.java
 
b/kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/KyuubiStatement.java
index 84965df203..23f0a1f43d 100644
--- 
a/kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/KyuubiStatement.java
+++ 
b/kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/KyuubiStatement.java
@@ -380,7 +380,7 @@ public class KyuubiStatement implements SQLStatement, 
KyuubiLoggable {
     TGetOperationStatusResp statusResp = null;
 
     // Poll on the operation status, till the operation is complete
-    do {
+    while (!isOperationComplete) {
       try {
         /**
          * For an async SQLOperation, GetOperationStatus will use the long 
polling approach It will
@@ -427,7 +427,7 @@ public class KyuubiStatement implements SQLStatement, 
KyuubiLoggable {
         isLogBeingGenerated = false;
         throw new KyuubiSQLException(e.toString(), "08S01", e);
       }
-    } while (!isOperationComplete);
+    }
 
     /*
       we set progress bar to be completed when hive query execution has 
completed
@@ -513,7 +513,7 @@ public class KyuubiStatement implements SQLStatement, 
KyuubiLoggable {
   @Override
   public int executeUpdate(String sql) throws SQLException {
     execute(sql);
-    return getUpdateCount();
+    return 0;
   }
 
   @Override
@@ -589,16 +589,8 @@ public class KyuubiStatement implements SQLStatement, 
KyuubiLoggable {
      * client might end up using executeAsync and then call this to check if 
the query run is
      * finished.
      */
-    long numModifiedRows = -1L;
-    TGetOperationStatusResp resp = waitForOperationToComplete();
-    if (resp != null && resp.isSetNumModifiedRows()) {
-      numModifiedRows = resp.getNumModifiedRows();
-    }
-    if (numModifiedRows == -1L || numModifiedRows > Integer.MAX_VALUE) {
-      LOG.warn("Invalid number of updated rows: {}", numModifiedRows);
-      return -1;
-    }
-    return (int) numModifiedRows;
+    waitForOperationToComplete();
+    return -1;
   }
 
   @Override

Reply via email to