HIVE-6246: Sign(a) UDF is not supported for decimal type

Review Request #17262 - Created Jan. 23, 2014 and updated

Information
Xuefu Zhang
hive-git
trunk
HIVE-6246
Reviewers
hive
Please see the JIRA description. It's believed that this has nevered worked. Added a method in UDFSign class to handle Decimal data type to make it work. This method returns INT instead of doulbe to be inline with other data bases.
Unit test is added.
Mohammad Islam
Overall looks good.
Is it possible to add a .q test or append to an existing .q test? 
  1. Actually unit test such as that provided is preferrable. Additional .q test only prelongs the build process while not providing much value for this case.
  2. ok with me. I agree the build-timing is important. but, in some instances,i found people prefer .q test.
Minor issue: does testByte() is a good name?
  1. A result of C&P. Will change it.
  2. sounds good.
Swarnim Kulkarni

   
Nit: Add Javadoc.
Nit: Add javadoc to this new method.
Prasad Mujumdar
Loading...