Review Board 1.7.22


HIVE-5731: Use new GenericUDF instead of basic UDF for UDFDate* classes

Review Request #15213 - Created Nov. 4, 2013 and updated

Mohammad Islam
trunk
HIVE-5731
Reviewers
hive
hive-git
GenericUDF class is the latest and recommended base class for any UDFs.
This JIRA is to change the current UDFDate* classes extended from GenericUDF.

 
Total:
1
Open:
1
Resolved:
0
Dropped:
0
Status:
From:
Description From Last Updated Status
First arg should be ((PrimitiveObjectInspector) arguments[0]) Ashutosh Chauhan Nov. 9, 2013, 6:44 p.m. Open
Review request changed
Updated (Nov. 11, 2013, 9:03 p.m.)
Update after incorporating with Ashutosh's comments.
Posted (Nov. 25, 2013, 11:13 p.m.)

   

  
Instead of converttoDate() and creating new Date() everytime, your earlier approach of getting DateWritable via converter and than obtaining Date from it via dw.get() was better, since new one requires creating new Date() everytime.
Have this object result as a class member and then reuse that object across function call by doing result.set() on each invocation, that will help in object reuse and save new() on each function invocation.