[ 
https://issues.apache.org/jira/browse/HIVE-27293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Riju Trivedi updated HIVE-27293:
--------------------------------
    Description: 
Attached repro.q file and data file used to reproduce the issue.
{code:java}
Insert overwrite table etarget
select mt.*, floor(rand() * 1) as bdata_no from (select nvl(np.client_id,' 
'),nvl(np.id_enddate,cast(0 as decimal(10,0))),nvl(np.client_gender,' 
'),nvl(np.birthday,cast(0 as decimal(10,0))),nvl(np.nationality,' 
'),nvl(np.address_zipcode,' '),nvl(np.income,cast(0 as 
decimal(15,2))),nvl(np.address,' '),nvl(np.part_date,cast(0 as int)) from 
(select * from esource where part_date = 20230414) np) mt;
 {code}
Outcome:
{code:java}
select client_id,birthday,income from etarget; 
15678   0  0.00
67891  19313  -1.00
12345  0  0.00{code}
Expected Result :
{code:java}
select client_id,birthday,income from etarget; 
12345 19613 -1.00
67891 19313 -1.00 
15678 0  0.00{code}
Disabling hive.vectorized.use.vectorized.input.format produces correct output.

  was:
Attached repro.q file and data file used to reproduce the issue.
{code:java}
Insert overwrite table etarget
select mt.*, floor(rand() * 1) as bdata_no from (select nvl(np.client_id,' 
'),nvl(np.id_enddate,cast(0 as decimal(10,0))),nvl(np.client_gender,' 
'),nvl(np.birthday,cast(0 as decimal(10,0))),nvl(np.nationality,' 
'),nvl(np.address_zipcode,' '),nvl(np.income,cast(0 as 
decimal(15,2))),nvl(np.address,' '),nvl(np.part_date,cast(0 as int)) from 
(select * from esource where part_date = 20230414) np) mt;
 {code}
Outcome:
{code:java}
select client_id,birthday,income from etarget;
889004570706    0   0.00
889004570838    19880313    -1.00
889005389931    0   0.00 {code}
Expected Result :
{code:java}
select client_id,birthday,income from etarget;
889004570706    0   0.00
889004570838    19880313    -1.00
889005389931    19880613    -1.00 {code}
Disabling hive.vectorized.use.vectorized.input.format produces correct output.


> Vectorization: Incorrect results with nvl for ORC table
> -------------------------------------------------------
>
>                 Key: HIVE-27293
>                 URL: https://issues.apache.org/jira/browse/HIVE-27293
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>    Affects Versions: 4.0.0-alpha-2
>            Reporter: Riju Trivedi
>            Priority: Major
>         Attachments: vectorization_nvl.q
>
>
> Attached repro.q file and data file used to reproduce the issue.
> {code:java}
> Insert overwrite table etarget
> select mt.*, floor(rand() * 1) as bdata_no from (select nvl(np.client_id,' 
> '),nvl(np.id_enddate,cast(0 as decimal(10,0))),nvl(np.client_gender,' 
> '),nvl(np.birthday,cast(0 as decimal(10,0))),nvl(np.nationality,' 
> '),nvl(np.address_zipcode,' '),nvl(np.income,cast(0 as 
> decimal(15,2))),nvl(np.address,' '),nvl(np.part_date,cast(0 as int)) from 
> (select * from esource where part_date = 20230414) np) mt;
>  {code}
> Outcome:
> {code:java}
> select client_id,birthday,income from etarget; 
> 15678   0  0.00
> 67891  19313  -1.00
> 12345  0  0.00{code}
> Expected Result :
> {code:java}
> select client_id,birthday,income from etarget; 
> 12345 19613 -1.00
> 67891 19313 -1.00 
> 15678 0  0.00{code}
> Disabling hive.vectorized.use.vectorized.input.format produces correct output.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to