There are issues in UDF never get exposed because the execution path is never tested:
- Assume the ObjectInspector to be WritableObjectInspector not the ObjectInspector pass to UDF
- Assume the input parameter to be Writable not respecting the ObjectInspector pass to UDF
- Assume ConstantObjectInspector to be WritableConstantXXXObjectInspector
- The InputObjectInspector does not match OutputObjectInspector of previous stage in UDAF
- The execution path involving convertIfNecessary is never been tested
Attach a patch to fix those.