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

Josh Rosen updated SPARK-10508:
-------------------------------
    Description: 
The following case expression never evaluates to 'test1' when cdec is -1 or 10 
as it will for Hive 0.13. Instead is returns 'other' for all rows.

{code}
select rnum, cdec, case when cdec in ( -1,10,0.1 )  then 'test1' else 'other' 
end from tdec 

create table  if not exists TDEC ( RNUM int , CDEC decimal(7, 2 )    )
TERMINATED BY '\n' 
 STORED AS orc  ;


0|\N
1|-1.00
2|0.00
3|1.00
4|0.10
5|10.00
{code}

  was:
The following case expression never evaluates to 'test1' when cdec is -1 or 10 
as it will for Hive 0.13. Instead is returns 'other' for all rows.

select rnum, cdec, case when cdec in ( -1,10,0.1 )  then 'test1' else 'other' 
end from tdec 

create table  if not exists TDEC ( RNUM int , CDEC decimal(7, 2 )    )
TERMINATED BY '\n' 
 STORED AS orc  ;


0|\N
1|-1.00
2|0.00
3|1.00
4|0.10
5|10.00



> incorrect evaluation of searched case expression
> ------------------------------------------------
>
>                 Key: SPARK-10508
>                 URL: https://issues.apache.org/jira/browse/SPARK-10508
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.3.1
>            Reporter: N Campbell
>
> The following case expression never evaluates to 'test1' when cdec is -1 or 
> 10 as it will for Hive 0.13. Instead is returns 'other' for all rows.
> {code}
> select rnum, cdec, case when cdec in ( -1,10,0.1 )  then 'test1' else 'other' 
> end from tdec 
> create table  if not exists TDEC ( RNUM int , CDEC decimal(7, 2 )    )
> TERMINATED BY '\n' 
>  STORED AS orc  ;
> 0|\N
> 1|-1.00
> 2|0.00
> 3|1.00
> 4|0.10
> 5|10.00
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to