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

Arina Ielchiieva updated DRILL-7073:
------------------------------------
    Description: 
CREATE SCHEMA command improvements:
1. add format
2. add default
3. add column properties

TupleSchema / ColumnMetadata improvements:
1. add properties map;
2. add format;
3. add default from string literal;
4. add ser / de methods.

Example: 
{noformat}
create schema 
(col date not null format 'yyyy-MM-dd' default '2018-12-31' properties { 
'prop1' = 'val1', 'prop2' = 'val2' })
path '/path/to/schema'
{noformat}

The following schema will be created:
{noformat}
{
  "schema" : {
    "columns" : [
      {
        "name" : "col",
        "type" : "DATE",
        "mode" : "REQUIRED",
        "format" : "yyyy-MM-dd",
        "default" : "2018-12-31",
        "properties" : {
          "prop2" : "val2",
          "prop1" : "val1"
        }
      }
    ]
  },
  "version" : 1
}
{noformat}


  was:
CREATE SCHEMA command improvements:
1. add format
2. add default
3. add column properties
Example: 
{noformat}
create schema 
(col date not null format 'yyyy-MM-dd' default '2018-12-31' properties { 
'prop1' = 'val1', 'prop2' = 'val2' })
path '/path/to/schema'
{noformat}

The following schema will be created:
{noformat}
{
  "schema" : {
    "columns" : [
      {
        "name" : "col",
        "type" : "DATE",
        "mode" : "REQUIRED",
        "format" : "yyyy-MM-dd",
        "default" : "2018-12-31",
        "properties" : {
          "prop2" : "val2",
          "prop1" : "val1"
        }
      }
    ]
  },
  "version" : 1
}
{noformat}

TupleSchema / ColumnMetadata improvements:
1. add properties map;
2. add format;
3. add default from string literal;
4. add ser / de methods.


> CREATE SCHEMA command / TupleSchema / ColumnMetadata improvements
> -----------------------------------------------------------------
>
>                 Key: DRILL-7073
>                 URL: https://issues.apache.org/jira/browse/DRILL-7073
>             Project: Apache Drill
>          Issue Type: Sub-task
>            Reporter: Arina Ielchiieva
>            Assignee: Arina Ielchiieva
>            Priority: Major
>             Fix For: 1.16.0
>
>
> CREATE SCHEMA command improvements:
> 1. add format
> 2. add default
> 3. add column properties
> TupleSchema / ColumnMetadata improvements:
> 1. add properties map;
> 2. add format;
> 3. add default from string literal;
> 4. add ser / de methods.
> Example: 
> {noformat}
> create schema 
> (col date not null format 'yyyy-MM-dd' default '2018-12-31' properties { 
> 'prop1' = 'val1', 'prop2' = 'val2' })
> path '/path/to/schema'
> {noformat}
> The following schema will be created:
> {noformat}
> {
>   "schema" : {
>     "columns" : [
>       {
>         "name" : "col",
>         "type" : "DATE",
>         "mode" : "REQUIRED",
>         "format" : "yyyy-MM-dd",
>         "default" : "2018-12-31",
>         "properties" : {
>           "prop2" : "val2",
>           "prop1" : "val1"
>         }
>       }
>     ]
>   },
>   "version" : 1
> }
> {noformat}



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

Reply via email to