[
https://issues.apache.org/jira/browse/HIVE-18236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16281298#comment-16281298
]
Hengyu Dai commented on HIVE-18236:
-----------------------------------
Hi [~mmccline]
DDL:
{code:sql}
CREATE TABLE `foo`(
`id` bigint,
`dt` string)
stored as orc;
{code}
and datafile is attached.
reproduced code:
{code:sql}
select * from foo;
out:
4133666 20171206
4133663 20171206
4133655 20171206
4133653 20171206
4133647 20171206
4133644 20171206
4133642 20171206
4133638 20171206
4133632 20171206
4133624 20171206
set hive.vectorized.execution.enabled=true;
select
dt,
sum(case when id ='' or id is null then 1 else 0 end) as bar
from foo
group by dt
;
out:
20171206 10
{code}
> Hive vectorized execution returned wrong result
> -----------------------------------------------
>
> Key: HIVE-18236
> URL: https://issues.apache.org/jira/browse/HIVE-18236
> Project: Hive
> Issue Type: Bug
> Components: Hive, Physical Optimizer
> Affects Versions: 2.1.1
> Reporter: Hengyu Dai
> Attachments: 000000_0
>
>
> vectorized execution returned weird result in a simple query.
> the following table foo has id column unique and not null, the query should
> return 0 for bar, but now it returns the size of foo
> {code:sql}
> -- 1. result : 20171205 199107
> set hive.vectorized.execution.enabled=true;
> select
> dt,
> sum(case when id ='' or id is null then 1 else 0 end) as bar
> from foo
> where dt=20171205
> group by dt
> ;
> -- 2. result : 20171205 0
> set hive.vectorized.execution.enabled=false;
> select
> dt,
> sum(case when id ='' or id is null then 1 else 0 end) as bar
> from foo
> where dt=20171205
> group by dt
> ;
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)