You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/04/02 07:41:00 UTC

[jira] [Commented] (DRILL-7143) Enforce column-level constraints when using a schema

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

ASF GitHub Bot commented on DRILL-7143:
---------------------------------------

paul-rogers commented on pull request #1726: DRILL-7143: Support default value for empty columns
URL: https://github.com/apache/drill/pull/1726
 
 
   Modifies the prior work to add default values for columns. The prior work added defaults
   when the entire column is missing from a reader (the old Nullable Int column). The Row
   Set mechanism now will also "fill empty" slots with the default value.
   
   Added default support for the column writers. The writers automatically obtain the
   default value from the column schema. The default can also be set explicitly on
   the column writer.
   
   Updated the null column mechanism to use this feature rather than the ad-hoc
   implemention in the prior commit.
   
   Semantics changed a bit. Only Required columns take a default. The default value
   is ignored or nullable columns since nullable columns already have a file default: NULL.
   
   Updated the CSV-with-schema tests to illustrate the new behavior.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Enforce column-level constraints when using a schema
> ----------------------------------------------------
>
>                 Key: DRILL-7143
>                 URL: https://issues.apache.org/jira/browse/DRILL-7143
>             Project: Apache Drill
>          Issue Type: Improvement
>    Affects Versions: 1.16.0
>            Reporter: Paul Rogers
>            Assignee: Paul Rogers
>            Priority: Major
>             Fix For: 1.16.0
>
>
> The recently added schema framework enforces schema constraints at the table level. We now wish to add additional constraints at the column level.
> * If a column is marked as "strict", then the reader will use the exact type and mode from the column schema, or fail if it is not possible to do so.
> * If a column is marked as required, and provides a default value, then that value is used instead of 0 if a row is missing a value for that column.
> This PR may also contain other fixes the the base functional revealed through additional testing.



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