[ 
https://issues.apache.org/jira/browse/DRILL-7685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17074208#comment-17074208
 ] 

Paul Rogers commented on DRILL-7685:
------------------------------------

Tested on Drill 1.18 snapshot. Works fine.

{noformat}
Query: select employee_id, case when department_id is not null then 1 else 2 
end as case_output from cp.`employee.json`
Rows Returned:  1155
{noformat}

Also tested the full CTAS query shown in the description. Also works fine.

Am running the query as a unit test: default config and options.

So, some questions:

* Can you try the query with the released Drill 1.17 or a build-it-yourself 
Drill 1.18 snapshot?
* If that works, can you upgrade your Drill 1.16 to use the version that works?
* If the query still fails for you, then there are probably some additional 
factors involved. What system/session options are set in your environment? What 
config options?

> Case statement marking column as required in parquet metadata
> -------------------------------------------------------------
>
>                 Key: DRILL-7685
>                 URL: https://issues.apache.org/jira/browse/DRILL-7685
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Storage - Parquet
>    Affects Versions: 1.16.0
>            Reporter: Nitin Pawar
>            Priority: Minor
>
> We use apache drill for multi step processing.
> In one of the steps we have query as below
> ~create table dfs.tmp.`/t2` as select employee_id, case when department_id is 
> not null then 1 else 2 end as case_output from cp.`employee.json`;~
> This provides output as 
> employee_id: OPTIONAL INT64 R:0 D:1
> case_output: REQUIRED INT32 R:0 D:0
> If we remove the end statement from case it does mark the column as optional.
>  
> We feed this output to covariance function and because of this we get an 
> error like below 
> Error: Missing function implementation: [covariance(BIGINT-OPTIONAL, 
> INT-REQUIRED)]. Full expression: --UNKNOWN EXPRESSION--
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to