Wrong value is retrieved by ResultSet.getColumnDisplaySize() for SMALLINT and
FLOAT Datatype
--------------------------------------------------------------------------------------------
Key: HIVE-2263
URL: https://issues.apache.org/jira/browse/HIVE-2263
Project: Hive
Issue Type: Bug
Components: JDBC
Affects Versions: 0.7.1, 0.5.0
Environment: Linux. Hadoop-20.1 and Hive-0.7.1
Reporter: rohithsharma
Priority: Minor
1).Create a table with smallint datatype.
create table test(a smallint,b int,c bigint);
2).ResultSet result = select a,b,c from test;
3) When I Try to get the getColumnDisplaySize()for the columns,
i.e ResultSet.getColumnDisplaySize(a) is 32 (default vaule )
ResultSet.getColumnDisplaySize(b) is 16
ResultSet.getColumnDisplaySize(c) is 32
But in the code, default is returning.
{noformat}
public int getColumnDisplaySize(int column) throws SQLException {
// taking a stab at appropriate values
switch (getColumnType(column)) {
case Types.VARCHAR:
case Types.BIGINT:
return 32;
case Types.TINYINT:
return 2;
case Types.BOOLEAN:
return 8;
case Types.DOUBLE:
case Types.INTEGER:
return 16;
default:
return 32;
}
}
{noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira