[ https://issues.apache.org/jira/browse/HIVE-8241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14146554#comment-14146554 ]
Mostafa Mokhtar commented on HIVE-8241: --------------------------------------- Looks like the wrong ObjectInspector is used when vectorization is on. > With vectorization enabled count(distinct)) fails with ClassCastException > ------------------------------------------------------------------------- > > Key: HIVE-8241 > URL: https://issues.apache.org/jira/browse/HIVE-8241 > Project: Hive > Issue Type: Bug > Components: Query Processor > Affects Versions: 0.14.0 > Environment: cn105 > Reporter: Mostafa Mokhtar > Assignee: Matt McCline > Fix For: 0.14.0 > > > Repro > {code} > set hive.vectorized.execution.enabled=true; > select count(distinct(cint)) from alltypesorc; > {code} > Exception > {code} > Caused by: java.lang.ClassCastException: > org.apache.hadoop.hive.serde2.objectinspector.StandardUnionObjectInspector$StandardUnion > cannot be cast to org.apache.hadoop.io.IntWritable > at > org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableIntObjectInspector.get(WritableIntObjectInspector.java:36) > at > org.apache.hadoop.hive.serde2.binarysortable.BinarySortableSerDe.serialize(BinarySortableSerDe.java:654) > at > org.apache.hadoop.hive.serde2.binarysortable.BinarySortableSerDe.serialize(BinarySortableSerDe.java:602) > at > org.apache.hadoop.hive.ql.exec.ReduceSinkOperator.toHiveKey(ReduceSinkOperator.java:468) > at > org.apache.hadoop.hive.ql.exec.vector.VectorReduceSinkOperator.processOp(VectorReduceSinkOperator.java:283) > at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:800) > at > org.apache.hadoop.hive.ql.exec.vector.VectorGroupByOperator.flushOutput(VectorGroupByOperator.java:918) > at > org.apache.hadoop.hive.ql.exec.vector.VectorGroupByOperator.writeSingleRow(VectorGroupByOperator.java:891) > at > org.apache.hadoop.hive.ql.exec.vector.VectorGroupByOperator.access$400(VectorGroupByOperator.java:63) > at > org.apache.hadoop.hive.ql.exec.vector.VectorGroupByOperator$ProcessingModeHashAggregate.flush(VectorGroupByOperator.java:463) > at > org.apache.hadoop.hive.ql.exec.vector.VectorGroupByOperator$ProcessingModeHashAggregate.checkHashModeEfficiency(VectorGroupByOperator.java:536) > at > org.apache.hadoop.hive.ql.exec.vector.VectorGroupByOperator$ProcessingModeHashAggregate.processBatch(VectorGroupByOperator.java:363) > at > org.apache.hadoop.hive.ql.exec.vector.VectorGroupByOperator.processOp(VectorGroupByOperator.java:851) > at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:800) > at > org.apache.hadoop.hive.ql.exec.vector.VectorSelectOperator.processOp(VectorSelectOperator.java:139) > at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:800) > at > org.apache.hadoop.hive.ql.exec.TableScanOperator.processOp(TableScanOperator.java:95) > at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:800) > at > org.apache.hadoop.hive.ql.exec.vector.VectorMapOperator.process(VectorMapOperator.java:43) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)