You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "jhuchuan (Jira)" <ji...@apache.org> on 2022/09/27 14:28:00 UTC

[jira] [Updated] (HIVE-26570) Incorrect results on sum(nvl(col,0)) when vectorization is ON

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

jhuchuan updated HIVE-26570:
----------------------------
    Description: 
1、

create table testdb.lc_appl
(
  loan_no string,
  fee_amt decimal(16,2)
)
clustered by (loan_no)
into 5 buckets
stored as orc
tblproperties('transactional'='true');

 

2、

insert into testdb.lc_appl
values ('a',12.12)

insert into testdb.lc_appl
values ('b',13.13)

 

set hive.vectorized.execution.enabled=false;
select loan_no ,sum(fee_amt),sum(nvl(fee_amt,0))
from testdb.lc_appl 
group by loan_no 

--right result

a 12.12 12.12 

b 13.13 13.13

 

 

set hive.vectorized.execution.enabled=true;
select loan_no ,sum(fee_amt),sum(nvl(fee_amt,0))
from testdb.lc_appl 
group by loan_no 

--wrong result

a 12.12 0

b 13.13 0

 

 

  was:
1、

create table testdb.lc_appl
(
  loan_no string,
  fee_amt decimal(16,2)
)
clustered by (loan_no)
into 5 buckets
stored as orc
tblproperties('transactional'='true');

 

2、

insert into testdb.lc_appl
values ('a',12.12)

insert into testdb.lc_appl
values ('b',13.13)

 

set hive.vectorized.execution.enabled=false;
select loan_no ,sum(fee_amt),sum(nvl(fee_amt,0))
from testdb.lc_appl 
group by loan_no 

--result

a 12.12 12.12 

b 13.13 13.13

 

 

set hive.vectorized.execution.enabled=true;
select loan_no ,sum(fee_amt),sum(nvl(fee_amt,0))
from testdb.lc_appl 
group by loan_no 

--result

a 12.12 0

b 13.13 0

 


> Incorrect results on sum(nvl(col,0)) when vectorization is ON
> -------------------------------------------------------------
>
>                 Key: HIVE-26570
>                 URL: https://issues.apache.org/jira/browse/HIVE-26570
>             Project: Hive
>          Issue Type: Bug
>          Components: Vectorization
>    Affects Versions: 2.1.1
>            Reporter: jhuchuan
>            Priority: Major
>             Fix For: All Versions
>
>
> 1、
> create table testdb.lc_appl
> (
>   loan_no string,
>   fee_amt decimal(16,2)
> )
> clustered by (loan_no)
> into 5 buckets
> stored as orc
> tblproperties('transactional'='true');
>  
> 2、
> insert into testdb.lc_appl
> values ('a',12.12)
> insert into testdb.lc_appl
> values ('b',13.13)
>  
> set hive.vectorized.execution.enabled=false;
> select loan_no ,sum(fee_amt),sum(nvl(fee_amt,0))
> from testdb.lc_appl 
> group by loan_no 
> --right result
> a 12.12 12.12 
> b 13.13 13.13
>  
>  
> set hive.vectorized.execution.enabled=true;
> select loan_no ,sum(fee_amt),sum(nvl(fee_amt,0))
> from testdb.lc_appl 
> group by loan_no 
> --wrong result
> a 12.12 0
> b 13.13 0
>  
>  



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