Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Cannot Reproduce
-
0.5.0, 0.7.1
-
None
-
None
-
Linux. Hadoop-20.1 and Hive-0.7.1
Description
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.
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; } }