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] [Commented] (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:comment-tabpanel&focusedCommentId=16621881#comment-16621881 ] 

shuifeng lu commented on DRILL-6722:
------------------------------------

It works fine when override the value of drill.exec.compile.prefer_plain_java to true.

after some tests and debugging, projector.projectRecords in ProjectRecordBatch.doWork() works incorrectly.

It is not easy to debug due to lack of debug info since if set saveCodeForDebugging to true, this works fine.

any suggestion is appreciated.

> 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)