hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mythili Gopalakrishnan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-1631) JDBC driver returns wrong precision, scale, or column size for some data types
Date Mon, 08 Aug 2011 08:44:27 GMT

    [ https://issues.apache.org/jira/browse/HIVE-1631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13080819#comment-13080819
] 

Mythili Gopalakrishnan commented on HIVE-1631:
----------------------------------------------

Fixing some typos  from previous comment

Just tested this fix and does NOT work correctly. Here are my findings on a FLOAT column

Without Patch on a FLOAT Column
--------------------------------
DatabaseMetaData.getColumns () COLUMN_SIZE returns 12
DatabaseMetaData.getColumns () DECIMAL_DIGITS - returns 0

ResultSetMetaData.getPrecision() returns 0
ResultSetMetaData.getScale() returns 0

With Patch on a FLOAT Column
----------------------------
DatabaseMetaData.getColumns () COLUMN_SIZE returns 24
DatabaseMetaData.getColumns () DECIMAL_DIGITS - returns 0

ResultSetMetaData.getPrecision() returns 7
ResultSetMetaData.getScale() returns 7

Also both DatabaseMetadata and ResultSetMetaData must return the same information for Precision
and Scale for FLOAT,DOUBLE types.


> JDBC driver returns wrong precision, scale, or column size for some data types
> ------------------------------------------------------------------------------
>
>                 Key: HIVE-1631
>                 URL: https://issues.apache.org/jira/browse/HIVE-1631
>             Project: Hive
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 0.7.0
>            Reporter: Steven Wong
>            Assignee: Patrick Hunt
>            Priority: Minor
>             Fix For: 0.8.0
>
>         Attachments: HIVE-1631.patch
>
>
> For some data types, these methods return values that do not conform to the JDBC spec:
> org.apache.hadoop.hive.jdbc.HiveResultSetMetaData.getPrecision(int)
> org.apache.hadoop.hive.jdbc.HiveResultSetMetaData.getScale(int)
> org.apache.hadoop.hive.jdbc.HiveResultSetMetaData.getColumnDisplaySize(int)
> org.apache.hadoop.hive.jdbc.JdbcColumn.getColumnSize()

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message