Details
Description
When a decimal division is the first operation, the quotient cannot be multiplied in a subsequent calculation. Instead, a NULL is returned.
The following yield NULL results:
select (cast (4.53 as decimal) / cast(25.86 as decimal)) * cast(0.087 as decimal) from <tablename> limit 1;
select cast (4.53 as decimal) / cast(25.86 as decimal) * cast(0.087 as decimal) from <tablename> limit 1;
If we move the multiplication operation to be first, then it will successfully calculate the result.
Attachments
Attachments
Issue Links
- is related to
-
HIVE-3976 Support specifying scale and precision with Hive decimal type
-
- Resolved
-