Skip to content

Commit

Permalink
Do not throw exception in KyuubiStatement#getMoreResults(int) in case…
Browse files Browse the repository at this point in the history
… of closing current result set
  • Loading branch information
tigrulya-exe committed Feb 28, 2024
1 parent 84e60e9 commit eeedaf8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,18 @@ public int getMaxRows() throws SQLException {
return maxRows;
}

@Override
public boolean getMoreResults(int current) throws SQLException {
// getMoreResults() javadoc says, that it should implicitly close
// any current ResultSet object, so here in case of Statement.CLOSE_CURRENT_RESULT
// we can implement the same logic
// see also https://issues.apache.org/jira/browse/HIVE-7680
if (current == Statement.CLOSE_CURRENT_RESULT) {
return false;
}
throw new SQLFeatureNotSupportedException("Method not supported");
}

@Override
public boolean getMoreResults() throws SQLException {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ default int[] executeBatch() throws SQLException {
throw new SQLFeatureNotSupportedException("Method not supported");
}

@Override
default boolean getMoreResults(int current) throws SQLException {
throw new SQLFeatureNotSupportedException("Method not supported");
}

@Override
default ResultSet getGeneratedKeys() throws SQLException {
throw new SQLFeatureNotSupportedException("Method not supported");
Expand Down

0 comments on commit eeedaf8

Please sign in to comment.