ZhengBowen created HIVE-27553:
---------------------------------
Summary: 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
Attachments: image-2023-07-31-20-40-00-679.png,
image-2023-07-31-20-40-35-050.png
I can reproduce this process.
{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 on Hive-1.0.1:
!image-2023-07-31-20-40-00-679.png!
2、The following are the execution results on Hive-3.1.3:
!image-2023-07-31-20-40-35-050.png!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)