It should call GenericUDAF.init first, so GenericUDAF knows what to store in the AggregationBuffer.
This patch moves the block of code up. It does not contain any additional tests but I think it's OK since it's such a simple change.
looks good - will commit if the tests pass
Committed. Thanks Zheng