Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
0.9.0
-
None
-
None
Description
For an 'int' partition column, the 'getColumnTypeName' metadata call is returning type 'string'. However, a DESCRIBE correctly returns type 'int'.
Doug Sedlak mentioned this issue in a comment of Hive-2315. https://issues.apache.org/jira/browse/HIVE-2315
A patch was submitted, but the ticket was closed before then.
This appears to be a bug.
Similar issue here to address the consistency of the call:
https://issues.apache.org/jira/browse/HIVE-4519
Sample table is:
create EXTERNAL table partition_by_int (str_val string) PARTITIONED BY (int_col INT) ROW FORMAT delimited fields terminated by ',' STORED AS TEXTFILE;
And (shortened) JDBC code is:
res = stmt.executeQuery("select * from partition_by_int");
ResultSetMetaData metaData = res.getMetaData();
for (int i = 0; i < metaData.getColumnCount(); i++)
With output:
str_val 2147483647 string
int_col 2147483647 string
In contrast, DESCRIBE partition_by_int generates:
str_val string
int_col int