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

Sergey Shelukhin commented on HIVE-11985:
-----------------------------------------

In the previous case, we stored what was in the schema; on some DBs it could be 
truncated and on some DBs it would make it impossible to create the table 
(Oracle). In the former case the truncation will not actually be visible to the 
user, because metastore values are never used, wrong data is stored in 
metastore. In any case, it is not always possible to get rid of truncation 
because varchar (e.g. in Oracle) is limited, you cannot make the column bigger 
than the limit.
I think there's also a risk from storing values in metastore in this case, 
because if someone were to actually use the values, it would be incorrect.
For example, if schema is changed, and someone takes the type from metastore, 
type will be incorrect; or, if someone tries to make changes in metastore as 
normal from some new code in Hive, these changes will be ignored because schema 
comes from deserializer.
The patch changes logic to not store values when they should not be used.

> don't store type names in metastore when metastore type names are not used
> --------------------------------------------------------------------------
>
>                 Key: HIVE-11985
>                 URL: https://issues.apache.org/jira/browse/HIVE-11985
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Sergey Shelukhin
>            Assignee: Sergey Shelukhin
>         Attachments: HIVE-11985.01.patch, HIVE-11985.02.patch, 
> HIVE-11985.03.patch, HIVE-11985.05.patch, HIVE-11985.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to