You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "zhangbutao (Jira)" <ji...@apache.org> on 2023/08/01 09:57:00 UTC
[jira] [Commented] (HIVE-27553) After upgrading from Hive1 to Hive3, Decimal computation experiences a loss of precision
[ https://issues.apache.org/jira/browse/HIVE-27553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17749598#comment-17749598 ]
zhangbutao commented on HIVE-27553:
-----------------------------------
This issue was caused by HIVE-15331 which emulated the SQL Server decimal behavior.
> After upgrading from Hive1 to Hive3, Decimal computation experiences a loss of precision
> ----------------------------------------------------------------------------------------
>
> Key: HIVE-27553
> URL: https://issues.apache.org/jira/browse/HIVE-27553
> Project: Hive
> Issue Type: Bug
> Components: HiveServer2
> Affects Versions: 3.1.3
> Reporter: ZhengBowen
> Priority: Major
> Attachments: image-2023-07-31-20-40-00-679.png, image-2023-07-31-20-40-35-050.png, image-2023-07-31-20-43-05-379.png, image-2023-07-31-20-43-49-775.png
>
>
> I can reproduce this bug.
> {quote}{{create}} {{table}} {{decimal_test(}}
> {{ }}{{id }}{{{}int{}}}{{{},{}}}
> {{ }}{{quantity }}{{{}decimal{}}}{{{}(38,8),{}}}
> {{ }}{{cost }}{{{}decimal{}}}{{{}(38,8){}}}
> {{) stored }}{{as}} {{textfile;}}
>
> {{insert}} {{into}} {{decimal_test }}{{{}values{}}}{{{}(1,0.00008000, 0.00015000);{}}}
>
> {{select}} {{quantity * cost }}{{from}} {{decimal_test;}}
> {quote}
> *1、The following are the execution results and execution plan on Hive-1.0.1:*
> !image-2023-07-31-20-40-00-679.png|width=550,height=230!
> !image-2023-07-31-20-43-05-379.png|width=540,height=144!
> *2、The following are the execution results and execution plan on Hive-3.1.3:*
> !image-2023-07-31-20-40-35-050.png|width=538,height=257!
> !image-2023-07-31-20-43-49-775.png|width=533,height=142!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)