[
https://issues.apache.org/jira/browse/HIVE-17682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16190252#comment-16190252
]
Matt McCline edited comment on HIVE-17682 at 10/3/17 9:35 PM:
--------------------------------------------------------------
Thanks to [~gopalv] for coming up with a very small test case and code fix:
{noformat}
drop table if exists foo;
create temporary table foo (x int, y int) stored as orc;
insert into foo values(1,1),(2,NULL),(3,1);
select x, IF(x > 0,y,0) from foo order by x;
{noformat}
was (Author: mmccline):
Thanks to [~gopalv] for coming up with a very small test case:
{noformat}
drop table if exists foo;
create temporary table foo (x int, y int) stored as orc;
insert into foo values(1,1),(2,NULL),(3,1);
select x, IF(x > 0,y,0) from foo order by x;
{noformat}
> Vectorization: IF stmt produces wrong results
> ---------------------------------------------
>
> Key: HIVE-17682
> URL: https://issues.apache.org/jira/browse/HIVE-17682
> Project: Hive
> Issue Type: Bug
> Components: Hive
> Affects Versions: 3.0.0
> Reporter: Matt McCline
> Assignee: Matt McCline
> Priority: Critical
> Fix For: 3.0.0
>
> Attachments: HIVE-17682.01.patch
>
>
> A query using with a vectorized IF(condition, thenExpr, elseExpr) function
> can produce wrong results.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)