[ 
https://issues.apache.org/jira/browse/HIVE-13333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15207618#comment-15207618
 ] 

Ashutosh Chauhan commented on HIVE-13333:
-----------------------------------------

{code}
Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to 
java.lang.Integer
        at 
org.apache.hadoop.hive.serde2.objectinspector.primitive.JavaIntObjectInspector.get(JavaIntObjectInspector.java:40)
        at 
org.apache.hadoop.hive.serde2.lazy.LazyUtils.writePrimitiveUTF8(LazyUtils.java:239)
        at 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe.serialize(LazySimpleSerDe.java:292)
        at 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe.serializeField(LazySimpleSerDe.java:247)
        at 
org.apache.hadoop.hive.serde2.DelimitedJSONSerDe.serializeField(DelimitedJSONSerDe.java:72)
        at 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe.doSerialize(LazySimpleSerDe.java:231)
        at 
org.apache.hadoop.hive.serde2.AbstractEncodingAwareSerDe.serialize(AbstractEncodingAwareSerDe.java:55)
        at 
org.apache.hadoop.hive.ql.exec.DefaultFetchFormatter.convert(DefaultFetchFormatter.java:71)
        at 
org.apache.hadoop.hive.ql.exec.DefaultFetchFormatter.convert(DefaultFetchFormatter.java:40)
        at 
org.apache.hadoop.hive.ql.exec.ListSinkOperator.process(ListSinkOperator.java:99)
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: 
java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
        at 
org.apache.hadoop.hive.ql.exec.ListSinkOperator.process(ListSinkOperator.java:102)
        at 
org.apache.hadoop.hive.ql.exec.FetchOperator.pushRow(FetchOperator.java:415)
        at org.apache.hadoop.hive.ql.exec.FetchTask.fetch(FetchTask.java:145)
{code}

from query:
{code}
select f,a,e,b from (select count(*) as a, count(c_int) as b, sum(c_int) as c, 
avg(c_int) as d, max(c_int) as e, min(c_int) as f from cbo_t1) cbo_t1
{code}



> StatsOptimizer throws ClassCastException
> ----------------------------------------
>
>                 Key: HIVE-13333
>                 URL: https://issues.apache.org/jira/browse/HIVE-13333
>             Project: Hive
>          Issue Type: Bug
>          Components: Logical Optimizer
>    Affects Versions: 2.0.0
>            Reporter: Ashutosh Chauhan
>
> mvn test -Dtest=TestCliDriver -Dtest.output.overwrite=true 
> -Dqfile=cbo_rp_udf_udaf.q -Dhive.compute.query.using.stats=true repros the 
> issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to