jhuchuan created HIVE-26570:
-------------------------------
Summary: 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
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
--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
--
This message was sent by Atlassian Jira
(v8.20.10#820010)