hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject [21/50] [abbrv] hive git commit: HIVE-15717 : JDBC: Implement rowDeleted, rowInserted and rowUpdated to return false (Tao Li via Thejas Nair)
Date Thu, 02 Feb 2017 02:03:20 GMT
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/hive-14535
Commit: f8e241b3136cc237638561b90eeaded42be57462
Parents: bb33ffa
Author: Tao Li <tli@hortonworks.com>
Authored: Tue Jan 31 13:18:10 2017 -0800
Committer: Thejas M Nair <thejas@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 {


Mime
View raw message