[ https://issues.apache.org/jira/browse/HIVE-5306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13771539#comment-13771539 ]
Jason Dere commented on HIVE-5306: ---------------------------------- Looking at latest patch: 1. Actually you may want to consider making inputConverter transient - it contains object inspectors and originally these weren't serializable, I had run into issues with UDFs attempting to serialize object inspectors when they added Kyro serialization a couple weeks back. Though I think they may have fixed that by making object inspectors serializable. In any case I think that field would be overwritten since if the UDF is serialized as part of a query plan and then deserialized, initialize() would be called again on the newly deserialized UDF. 2. How about float/string? I think those can be converted to double. 3. Looks like initialize()/evaluate() have some code commented out - those can be removed 4. I think those lines with getConverter() probably break the 100-character rule in the Hive coding conventions, break that line up into multiple lines. > Use new GenericUDF instead of basic UDF for UDFAbs class > -------------------------------------------------------- > > Key: HIVE-5306 > URL: https://issues.apache.org/jira/browse/HIVE-5306 > Project: Hive > Issue Type: Improvement > Components: UDF > Reporter: Mohammad Kamrul Islam > Assignee: Mohammad Kamrul Islam > Attachments: HIVE-5306.1.patch, HIVE-5306.2.patch, HIVE-5306.3.patch, > HIVE-5306.4.patch > > > GenericUDF class is the latest and recommended base class for any UDFs. > This JIRA is to change the current UDFAbs class extended from GenericUDF. > The general benefit of GenericUDF is described in comments as > "* The GenericUDF are superior to normal UDFs in the following ways: 1. It can > * accept arguments of complex types, and return complex types. 2. It can > accept > * variable length of arguments. 3. It can accept an infinite number of > function > * signature - for example, it's easy to write a GenericUDF that accepts > * array<int>, array<array<int>> and so on (arbitrary levels of nesting). 4. > It > * can do short-circuit evaluations using DeferedObject." -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira