hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rohith Sharma K S (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HIVE-2263) Wrong value is retrieved by ResultSet.getColumnDisplaySize() for SMALLINT and FLOAT Datatype
Date Thu, 06 Oct 2016 12:29:20 GMT

     [ https://issues.apache.org/jira/browse/HIVE-2263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rohith Sharma K S resolved HIVE-2263.
-------------------------------------
    Resolution: Cannot Reproduce

Closing as Can't Reproduce since  several releases has been given after this bug.

> 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.5.0, 0.7.1
>         Environment: Linux. Hadoop-20.1 and Hive-0.7.1
>            Reporter: Rohith Sharma K S
>            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 was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message