2

I have a hive table with following properties -

  • ORC Storage Format
  • transactional = true
  • Partitioned on 4 keys - year, month, day, hour
  • bucketed by groupingKey

I am using Hive Streaming for populating data directly into table.

Now my problem is - I am trying to run following query

select count(*) from table_name;

I am getting following exception

Caused by: java.lang.ClassCastException:    org.apache.hadoop.hive.ql.io.orc.OrcStruct$OrcStructInspector cannot be cast to org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector
at org.apache.hadoop.hive.ql.exec.vector.VectorizedBatchUtil.setVector(VectorizedBatchUtil.java:295)
at org.apache.hadoop.hive.ql.exec.vector.VectorizedBatchUtil.acidAddRowToBatch(VectorizedBatchUtil.java:275)
at org.apache.hadoop.hive.ql.io.orc.VectorizedOrcAcidRowReader.next(VectorizedOrcAcidRowReader.java:82)

However if I turn off vectorized execution by setting following property

set hive.vectorized.execution.enabled = false;

everything works fine (Although it takes ages to complete).

Why is this happening ? From what I understand, with ORC format, vectorized execution should work.

Hadoop Version - 2.7.1

Hive Version - 1.2.1

3
  • Rishabh, My answer was useful? Commented Aug 2, 2016 at 6:00
  • @RamPrasadG I am using hive 1.2.1 and trying to see if I can upgrade to 1.3.0. Hence unable to verify this. However, it seems it is the same issue. Thanks a lot. Will verify and accept answer Commented Aug 2, 2016 at 6:35
  • if you are okay with answer please vote/accept as owner Commented Oct 24, 2017 at 8:49

1 Answer 1

0

Seems like this hive issue has been closed/fixed. please recheck your version of hive used.

Please check Vectorized execution causes ClassCastException

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.