You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "junnan.yang (Jira)" <ji...@apache.org> on 2021/05/27 03:57:00 UTC

[jira] [Commented] (HIVE-24614) using coalesce via vector,when date type of column are different between source and target,the result of target is zero

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

junnan.yang commented on HIVE-24614:
------------------------------------

# This is similar to HIVE-25169 , may be the patch in HIVE-25169 can resolve your problem

> using coalesce via vector,when date type of column are different between source and target,the result of target is zero
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-24614
>                 URL: https://issues.apache.org/jira/browse/HIVE-24614
>             Project: Hive
>          Issue Type: Bug
>          Components: Vectorization
>    Affects Versions: 3.1.2
>            Reporter: taoyuyin
>            Priority: Major
>
> set hive.vectorized.execution.enabled=true;
>  
> CREATE TABLE `tmp.tmp_test_vectorization_source`( 
>  `rn` string,
>  `val_1` int,
>  `val_2` bigint)
>  stored as parquet;
>  
> insert into table `tmp.tmp_test_vectorization_source` values('line1',1000,10001),('line1',2000,20001);
>  
> select rn,val_1,val_2 from tmp.tmp_test_vectorization_source t;
>  
> +---------+-------++--------
> |rn|val_1|val_2|
> +---------+-------++--------
> |line1|1000|10001|
> |line1|2000|20001|
> +---------+-------++--------
>  
> CREATE TABLE `tmp.tmp_test_vectorization_target`( 
>  `rn` string,
>  `val_1` bigint,
>  `val_2` int)
>  stored as parquet;
>  
> insert into table tmp.tmp_test_vectorization_target
>  select
>  rn,
>  coalesce(val_1,0),
>  coalesce(val_2,0)
>  from tmp.tmp_test_vectorization_source;
>  
> select rn,val_1,val_2 from tmp.tmp_test_vectorization_target t;
>  
> +---------+-------++--------
> |rn|val_1|val_2|
> +---------+-------++--------
> |line1|0|0|
> |line1|0|0|
> +---------+-------++--------



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