You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by "benj.dev" <be...@laposte.net.INVALID> on 2019/05/06 21:21:59 UTC

Creating parquet with Drill and mode NOT NULL

Hi,

I would like to know if a solution exists to force the mode to "NOT
NULL" for a data type when creating a parquet via "CREATE TABLE AS".

I know how to force the mode to "NULL" using the NULLIF function
- SELECT modeof(3) => NOT NULL
- SELECT modeof(NULLIF(3,CAST(NULL AS integer))) => NULLABLE

I would have hopped that using COALESCE could have done the trick to
force at "NOT NULL" whith something like "...COALESCE(field,'')".
Unfortunatly :
- SELECT modeof(COALESCE(NULLIF(3,CAST(NULL AS integer)), 0)) => NULLABLE
even if in fact the value can never be NULL

I would be happy if someone knew a trick to force the mode in NOT NULL.

Please note that I have already create an issue on jira about mode
management: https://issues.apache.org/jira/browse/DRILL-7090

Regards,