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.
Overall looks good. Is it possible to add a .q test or append to an existing .q test?
-
ql/src/test/org/apache/hadoop/hive/ql/udf/TestUDFSign.java (Diff revision 1) -
Minor issue: does testByte() is a good name?
-
ql/src/java/org/apache/hadoop/hive/ql/udf/UDFSign.java (Diff revision 1) -
Nit: Add Javadoc.
-
ql/src/java/org/apache/hadoop/hive/ql/udf/UDFSign.java (Diff revision 1) -
Nit: Add javadoc to this new method.
