You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Chinna Rao Lalam <la...@gmail.com> on 2016/12/26 09:51:28 UTC

Review Request 55036: Scale is greater than decimal values trunc(d, s) returns wrong results

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55036/
-----------------------------------------------------------

Review request for hive and Ashutosh Chauhan.


Repository: hive-git


Description
-------

When scale arguments is greater than the decimal values count, it is returning wrong results. Now returned the actuval value when scale is greater than decimal values count, when scale is positive. Added few more negative tests also.


Diffs
-----

  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFTrunc.java a95248f 
  ql/src/test/queries/clientpositive/udf_trunc_number.q b3fd9e5 
  ql/src/test/results/clientpositive/udf_trunc_number.q.out dfc9d70 

Diff: https://reviews.apache.org/r/55036/diff/


Testing
-------

All tests are passed.


Thanks,

Chinna Rao Lalam