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 5fac14f11a..4a82aa5fbd 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 void testResultSetMetaDataDuplicateColumnNames() throws SQLException { 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 diff --git a/jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java b/jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java index 93f093f689..6d4b2b1601 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 boolean relative(int rows) throws SQLException { } 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 {