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

Sergey Shelukhin commented on HIVE-13098:
-----------------------------------------

[~mmccline] the main concern here is automated nulls, where people get them 
after they import a large amount of data. If the ETL runs every day they cannot 
be expected to look at the data every day (arguably it should be cleaned up by 
someone else before Hive in this case, but people make mistakes and there are 
bugs in other code...)

One way to handle this for most cases would be to break the existing behavior 
to always throw, and add a separate UDF ("trycast"?) for people who don't care. 
However that would only work in queries, not for automated pipelines/writers.


> Add a strict check for when the decimal gets converted to null due to 
> insufficient width
> ----------------------------------------------------------------------------------------
>
>                 Key: HIVE-13098
>                 URL: https://issues.apache.org/jira/browse/HIVE-13098
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Sergey Shelukhin
>            Assignee: Sergey Shelukhin
>         Attachments: HIVE-13098.WIP.patch, HIVE-13098.WIP2.patch
>
>
> When e.g. 999999 is selected as decimal(5,0), the result is null. This can be 
> problematic, esp. if the data is written to a table and lost without the user 
> realizing it. There should be an option to error out in such cases instead; 
> it should probably be on by default and the error message should instruct the 
> user on how to disable it.



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

Reply via email to