Would have to look at the UDTF to know for sure what is going on - it might not be using the object inspectors properly here. Is it using the ObjectInspectors that were passed in during initialize(), or is it creating a WritableStringObjectInspector and assuming this will work with the value object? If the ??value object is a LazyString i would expect that initialize() would have passed in a LazyStringObjectInspector, in which case getPrimitiveJavaObject() would have done the right thing.
What version was this working before with? ________________________________ From: Jim Green <openkbi...@gmail.com> Sent: Thursday, August 06, 2015 6:15 PM To: user@hive.apache.org Subject: UDTF fails with java.lang.ClassCastException Hi Team, One UDTF fails in Hive 1.0 with below stacktrace: Caused by: java.lang.ClassCastException: org.apache.hadoop.hive.serde2.lazy.LazyString cannot be cast to org.apache.hadoop.io.Text at org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableStringObjectInspector.getPrimitiveJavaObject(WritableStringObjectInspector.java:46) at org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableStringObjectInspector.getPrimitiveJavaObject(WritableStringObjectInspector.java:26) at jp.co.recruit.hadoop.hive.contrib.udtf.StringSeparator.process(StringSeparator.java:117) at org.apache.hadoop.hive.ql.exec.UDTFOperator.processOp(UDTFOperator.java:108) at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:815) at org.apache.hadoop.hive.ql.exec.SelectOperator.processOp(SelectOperator.java:84) at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:815) at org.apache.hadoop.hive.ql.exec.FilterOperator.processOp(FilterOperator.java:120) at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:815) at org.apache.hadoop.hive.ql.exec.TableScanOperator.processOp(TableScanOperator.java:95) at org.apache.hadoop.hive.ql.exec.MapOperator$MapOpCtx.forward(MapOperator.java:157) at org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:493) ... 17 more It worksed fine in older version of Hive. Is it something triggered by the data? Or anything changed in Hive 1.0 so that LazyString can not convert to Text? -- Thanks, www.openkb.info<http://www.openkb.info> (Open KnowledgeBase for Hadoop/Database/OS/Network/Tool)