Hive udtf 报错 java.lang.String cannot be cast to java.lang.Integer

Error  :


Failed with exception java.io.IOException:org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer



reason :

在设置IO类型时采用了错误的数据类型


fieldNames.add("activityName");//9
fieldOIs.add(PrimitiveObjectInspectorFactory.javaStringObjectInspector);

previous :
fieldOIs.add(PrimitiveObjectInspectorFactory.javaIntObjectInspector);


posted @ 2018-03-08 09:14  yuerspring  阅读(777)  评论(0编辑  收藏  举报