Hi, all. I'm new to Hive, I have a question about executeUpdate.
I executed a SQL by invoking HiveStatement.executeUpdate method. I found that
it throws an "Method not supported" exception.
And I checked the code in
hive-0.9\jdbc\src\java\org\apache\hadoop\hive\jdbc\HiveStatement.java, I found
that the "Method not supported" is always threw unless client.execute(sql)
throws an exceptioin.
I'm confused about it, why executeUpdate always throws an exeption?
public int executeUpdate(String sql) throws SQLException {
try {
client.execute(sql);
} catch (Exception ex) {
throw new SQLException(ex.toString());
}
throw new SQLException("Method not supported");
}