hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Grover <>
Subject Re: A question about HiveStatement.executeUpdate's exception
Date Fri, 31 Aug 2012 15:50:50 GMT
Hi Liyifan,
This seems like a bug. As a workaround, I would recommend using HiveStatement.executeQuery()
instead (since they both call execute() on the Thrift client).

There is a JIRA already for this ( and seems
like a patch was uploaded as well ( but nothing has been
committed just yet.

I've asked for the status on the JIRA, let's see what they say:-)


----- Original Message -----
From: "Liyifan" <>
Sent: Tuesday, August 28, 2012 9:47:37 PM
Subject: A question about HiveStatement.executeUpdate's exception

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\,
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 { 
} catch (Exception ex) { 
throw new SQLException(ex.toString()); 
throw new SQLException("Method not supported"); 

View raw message