You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Chaoyu Tang (JIRA)" <ji...@apache.org> on 2016/07/19 15:43:20 UTC
[jira] [Created] (HIVE-14281) Issue in decimal multiplication
Chaoyu Tang created HIVE-14281:
----------------------------------
Summary: Issue in decimal multiplication
Key: HIVE-14281
URL: https://issues.apache.org/jira/browse/HIVE-14281
Project: Hive
Issue Type: Bug
Components: Types
Reporter: Chaoyu Tang
Assignee: Chaoyu Tang
{code}
CREATE TABLE test (a DECIMAL(38,18), b DECIMAL(38,18));
INSERT OVERWRITE TABLE test VALUES (20, 20);
SELECT a*b from test
{code}
The returned result is NULL (instead of 400)
It is because Hive adds the scales from operands and the type for a*b is set to decimal (38, 36). Hive could not handle this case properly (e.g. by rounding)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)