[
https://issues.apache.org/jira/browse/HIVE-24532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17258913#comment-17258913
]
Mustafa İman commented on HIVE-24532:
-------------------------------------
minimal reproducer
CREATE TABLE src (key string COMMENT 'default') STORED AS TEXTFILE;
LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/kv1.txt" INTO TABLE src;
set hive.stats.autogather=false;
set hive.explain.user=false;
set hive.exec.dynamic.partition=true;
create table ctas_part (key int) partitioned by (modkey bigint);
insert overwrite table ctas_part partition (modkey)
select key, ceil(key / 100) from src order by key limit 10;
> 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
> Priority: Major
> 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)