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

Jason Dere commented on HIVE-5355:
----------------------------------

Hey Xuefu, for these changes:
{noformat}
     case Types.VARCHAR:
-      if (columnAttributes != null) {
-        return columnAttributes.precision;
-      }
-      return Integer.MAX_VALUE; // hive has no max limit for strings
+      return columnPrecision(columnType, columnAttributes);
{noformat}

String columns end up getting translated to JDBC varchar type.  So changing 
this would result in a NPE if the user tries to call getColumnDisplaySize() for 
string columns, because I think the columnAttributes are null for non-qualified 
Hive types.
Not sure if you have to worry about a similar issue for decimal if you are 
connecting to a pre-HIVE-3976 Hive server, are newer clients meant to be 
backward compatible with older servers?

> JDBC support for decimal precision/scale
> ----------------------------------------
>
>                 Key: HIVE-5355
>                 URL: https://issues.apache.org/jira/browse/HIVE-5355
>             Project: Hive
>          Issue Type: Task
>          Components: Serializers/Deserializers
>    Affects Versions: 0.10.0
>            Reporter: Xuefu Zhang
>            Assignee: Xuefu Zhang
>             Fix For: 0.13.0
>
>         Attachments: HIVE-5355.1.patch, HIVE-5355.2.patch, HIVE-5355.patch
>
>
> A subtask of HIVE-3976.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to