You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "shuifeng lu (JIRA)" <ji...@apache.org> on 2018/09/20 11:51:00 UTC

[jira] [Updated] (DRILL-6722) Query from parquet with case-then and arithmetic operation returns a wrong result

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

shuifeng lu updated DRILL-6722:
-------------------------------
    Component/s: Execution - Codegen

> Query from parquet with case-then and arithmetic operation returns a wrong result
> ---------------------------------------------------------------------------------
>
>                 Key: DRILL-6722
>                 URL: https://issues.apache.org/jira/browse/DRILL-6722
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Codegen
>    Affects Versions: 1.14.0
>            Reporter: Oleg Zinoviev
>            Priority: Major
>         Attachments: correct.csv, result.csv
>
>
> Steps to reproduce:
> 1) Create sample table:
> {code:sql}
> create table dfs.tmp.test as 
>   select 1 as a, 2 as b
>   union all
>   select 3 as a, 2 as b
>   union all
>   select 1 as a, 4 as b
>   union all
>   select 2 as a, 2 as b
> {code}
> 2)  Execute query:
> {code:sql}
> select
>   case when s.a > s.b then s.a else s.b end as b, 
>   abs(s.a - s.b) as d
> from dfs.tmp.test s
> {code}
> 3) Drill returns:  [^result.csv] 
> 4) Result of query without parquet:
> {code:sql}
> select 
> 	case when s.a > s.b then s.a else s.b end as b, 
> 	abs(s.a - s.b) as d
> from (
> 	select 1 as a, 2 as b
> 	union all
> 	select 3 as a, 2 as b
> 	union all
> 	select 1 as a, 4 as b
> 	union all
> 	select 2 as a, 2 as b
> ) s
> {code}
>  [^correct.csv] 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)