Mustafa İman created HIVE-24532:
-----------------------------------

             Summary: Reduce sink vectorization mixes column types
                 Key: HIVE-24532
                 URL: https://issues.apache.org/jira/browse/HIVE-24532
             Project: Hive
          Issue Type: Bug
            Reporter: Mustafa İman
         Attachments: castexception.txt, explainplan.txt

I do insert overwrite select on a partitioned table. Partition column is 
specified dynamically from select query. "ceil" function is applied on a string 
column to specify partition for each row. Reduce sink gets confused about the 
type of partition column. It leads to following cast exception in runtime:
{code:java}
Caused by: java.lang.ClassCastException: 
org.apache.hadoop.hive.ql.exec.vector.LongColumnVector cannot be cast to 
org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector
        at 
org.apache.hadoop.hive.ql.exec.vector.VectorSerializeRow.serializePrimitiveWrite(VectorSerializeRow.java:452)
        at 
org.apache.hadoop.hive.ql.exec.vector.VectorSerializeRow.serializeWrite(VectorSerializeRow.java:279)
        at 
org.apache.hadoop.hive.ql.exec.vector.VectorSerializeRow.serializeWrite(VectorSerializeRow.java:258)
        at 
org.apache.hadoop.hive.ql.exec.vector.reducesink.VectorReduceSinkObjectHashOperator.processKey(VectorReduceSinkObjectHashOperator.java:305)
        ... 28 more

{code}
The problem is reproducible by running mvn test 
-Dtest=TestMiniLlapLocalCliDriver -Dqfile=insert0.q with "set 
hive.stats.autogather=false". The additional config option causes insert 
statements to be vectorized so the vectorization bug appears.

insert0.q: 
[https://github.com/apache/hive/blob/fb046c77257d648d0ee232356bdf665772b28bdd/ql/src/test/queries/clientpositive/insert0.q]

 

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to