You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by th...@apache.org on 2017/01/31 21:18:15 UTC

hive git commit: HIVE-15717 : JDBC: Implement rowDeleted, rowInserted and rowUpdated to return false (Tao Li via Thejas Nair)

Repository: hive
Updated Branches:
  refs/heads/master bb33ffacb -> f8e241b31


HIVE-15717 : JDBC: Implement rowDeleted, rowInserted and rowUpdated to return false (Tao Li via Thejas Nair)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/f8e241b3
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/f8e241b3
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/f8e241b3

Branch: refs/heads/master
Commit: f8e241b3136cc237638561b90eeaded42be57462
Parents: bb33ffa
Author: Tao Li <tl...@hortonworks.com>
Authored: Tue Jan 31 13:18:10 2017 -0800
Committer: Thejas M Nair <th...@hortonworks.com>
Committed: Tue Jan 31 13:18:10 2017 -0800

----------------------------------------------------------------------
 .../test/java/org/apache/hive/jdbc/TestJdbcDriver2.java  | 11 +++++++++++
 .../src/java/org/apache/hive/jdbc/HiveBaseResultSet.java |  6 +++---
 2 files changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/f8e241b3/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java b/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
index 5fac14f..4a82aa5 100644
--- a/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
+++ b/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
@@ -1808,6 +1808,17 @@ public class TestJdbcDriver2 {
     stmt.close();
   }
 
+  @Test
+  public void testResultSetRowProperties() throws SQLException {
+	  Statement stmt = con.createStatement();
+	  ResultSet res =
+	      stmt.executeQuery("select * from "
+	          + dataTypeTableName + " limit 1");
+	  assertFalse(res.rowDeleted());
+	  assertFalse(res.rowInserted());
+	  assertFalse(res.rowUpdated());
+  }
+
   // [url] [host] [port] [db]
   private static final String[][] URL_PROPERTIES = new String[][] {
     // binary mode

http://git-wip-us.apache.org/repos/asf/hive/blob/f8e241b3/jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java
----------------------------------------------------------------------
diff --git a/jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java b/jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java
index 93f093f..6d4b2b1 100644
--- a/jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java
+++ b/jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java
@@ -658,15 +658,15 @@ public abstract class HiveBaseResultSet implements ResultSet {
   }
 
   public boolean rowDeleted() throws SQLException {
-    throw new SQLException("Method not supported");
+    return false;
   }
 
   public boolean rowInserted() throws SQLException {
-    throw new SQLException("Method not supported");
+    return false;
   }
 
   public boolean rowUpdated() throws SQLException {
-    throw new SQLException("Method not supported");
+    return false;
   }
 
   public void setFetchDirection(int direction) throws SQLException {