hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zheng Shao <zsh...@gmail.com>
Subject Re: Join Errors
Date Tue, 16 Jun 2009 00:25:11 GMT
Hi Bill,

Yes this is a known problem that recently got fixed in trunk. Will you try
trunk code?

Another option is to cast the input columns of the join operator to string
using "CAST(xxx) AS STRING".

Zheng

On Mon, Jun 15, 2009 at 3:16 PM, Bill Craig <bcraig7@gmail.com> wrote:

> We are using hive 0.3.0 and are getting the following when joining on
> Integer fields.
> We are also getting a very similar problem using the case UDF is this
> a known problem?
>
> java.io.IOException: org.apache.hadoop.hive.ql.metadata.HiveException:
> java.lang.ClassCastException: org.apache.hadoop.io.IntWritable cannot
> be cast to org.apache.hadoop.io.Text
>        at
> org.apache.hadoop.hive.ql.exec.ExecReducer.reduce(ExecReducer.java:180)
>        at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:436)
>        at org.apache.hadoop.mapred.Child.main(Child.java:158)
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException:
> java.lang.ClassCastException: org.apache.hadoop.io.IntWritable cannot
> be cast to org.apache.hadoop.io.Text
>        at
> org.apache.hadoop.hive.ql.exec.GroupByOperator.process(GroupByOperator.java:508)
>        at
> org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:383)
>        at
> org.apache.hadoop.hive.ql.exec.JoinOperator.createForwardJoinObject(JoinOperator.java:293)
>        at
> org.apache.hadoop.hive.ql.exec.JoinOperator.genObject(JoinOperator.java:536)
>        at
> org.apache.hadoop.hive.ql.exec.JoinOperator.genObject(JoinOperator.java:525)
>        at
> org.apache.hadoop.hive.ql.exec.JoinOperator.genObject(JoinOperator.java:525)
>        at
> org.apache.hadoop.hive.ql.exec.JoinOperator.checkAndGenObject(JoinOperator.java:566)
>        at
> org.apache.hadoop.hive.ql.exec.JoinOperator.endGroup(JoinOperator.java:548)
>        at
> org.apache.hadoop.hive.ql.exec.ExecReducer.reduce(ExecReducer.java:145)
>        ... 2 more
> Caused by: java.lang.ClassCastException:
> org.apache.hadoop.io.IntWritable 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:186)
>        at
> org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.copyToStandardObject(ObjectInspectorUtils.java:172)
>        at
> org.apache.hadoop.hive.ql.exec.GroupByOperator.deepCopyElements(GroupByOperator.java:521)
>        at
> org.apache.hadoop.hive.ql.exec.GroupByOperator.deepCopyElements(GroupByOperator.java:514)
>        at
> org.apache.hadoop.hive.ql.exec.GroupByOperator.processHashAggr(GroupByOperator.java:534)
>        at
> org.apache.hadoop.hive.ql.exec.GroupByOperator.process(GroupByOperator.java:502)
>        ... 10 more
>



-- 
Yours,
Zheng

Mime
View raw message