Hive自定义UDF/UDAF/UDTF中,如何获得List的ObjectInspector

在Hive中,在使用GenercU**F实现自定义UDF/UDAF/UDTF时,经常要制定输出类型,其中要获得一个ObjectInspector。

对于基础类型:

PrimitiveObjectInspectorFactory.javaStringObjectInspector)

对于List等复合类型,要2步:

ObjectInspectorFactory
				.getStandardListObjectInspector(PrimitiveObjectInspectorFactory.javaStringObjectInspector)

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *