hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zhou Shuaifeng <zhoushuaif...@huawei.com>
Subject RE: Hive problem when using JDBC driver and type float
Date Thu, 24 Jun 2010 10:33:27 GMT
Float is not supported because it's not supported by Thrift, and Hive uses
Thrift a lot for internal data serialization/deserialization.
See http://wiki.apache.org/hadoop/Hive/HiveQL/Types
 
Shuaifeng 
  _____  

From: Marc Limotte [mailto:mslimotte@gmail.com] 
Sent: Thursday, June 24, 2010 10:11 AM
To: hive-user@hadoop.apache.org
Subject: Hive problem when using JDBC driver and type float


I've run into a problem using the Hive JDBC driver, with tables that contain
floats.  The following two statements work fine in the hive shell, but break
if I execute them through the JDBC driver.  

I can create a table like this:


CREATE TABLE simple (
 id int,
 value string,
 amt float
)
ROW FORMAT DELIMITED
STORED AS TEXTFILE


Which works ok.  But then I try this:


select * from simple


This fails with an exception


java.sql.SQLException: Could not create ResultSet:
java.lang.RuntimeException: specifying type float which has not been defined
    at
org.apache.hadoop.hive.jdbc.HiveResultSet.initDynamicSerde(HiveResultSet.jav
a:120)
    at
org.apache.hadoop.hive.jdbc.HiveResultSet.<init>(HiveResultSet.java:74)
    at
org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:17
8)
    ...


I'm using Hive 0.5.0, but it's the Cloudera distribution (0.5.0+20).  This
is all running locally on my mac on a standalone cluster.

Also, if I use type "double" instead of "float", then it works.  Which is a
suitable work around for my needs, but I'm wondering what's going on.

Marc

 


Mime
View raw message