klout/brickhouse — pull request #81 by Leemoonsoo (2014-02-23 07:22:32+00:00)
Title: Make collect() respect value type.

Current implementation of collect UDAF does not resect Value type.
for example
```
collect(STRING_TYPE_COLUMN, INT_TYPE_COLUMN)
```
generates following exceptions
```
Caused by: java.lang.ClassCastException: org.apache.hadoop.io.LongWritable cannot be cast to org.apache.hadoop.io.Text
at org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableStringObjectInspector.copyObject(WritableStringObjectInspector.java:35)
at org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.copyToStandardObject(ObjectInspectorUtils.java:249)
at org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.copyToStandardObject(ObjectInspectorUtils.java:229)
at brickhouse.udf.collect.CollectUDAF$MapCollectUDAFEvaluator.putIntoSet(CollectUDAF.java:252)
at brickhouse.udf.collect.CollectUDAF$MapCollectUDAFEvaluator.iterate(CollectUDAF.java:222)
at org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.aggregate(GenericUDAFEvaluator.java:159)
```
This PR includes code fixes for this issue.