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/09/03 11:22:00 UTC

[jira] [Commented] (DRILL-7168) Implement ALTER SCHEMA ADD / REMOVE COLUMN / PROPERTY commands

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

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

arina-ielchiieva commented on pull request #1850: DRILL-7168: Implement ALTER SCHEMA ADD / REMOVE commands
URL: https://github.com/apache/drill/pull/1850
 
 
   Jira - [DRILL-7168](https://issues.apache.org/jira/browse/DRILL-7168).
 
----------------------------------------------------------------
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


> Implement ALTER SCHEMA ADD / REMOVE COLUMN / PROPERTY commands
> --------------------------------------------------------------
>
>                 Key: DRILL-7168
>                 URL: https://issues.apache.org/jira/browse/DRILL-7168
>             Project: Apache Drill
>          Issue Type: Sub-task
>            Reporter: Arina Ielchiieva
>            Assignee: Arina Ielchiieva
>            Priority: Major
>              Labels: doc-impacting
>             Fix For: 1.17.0
>
>
> By [~Paul.Rogers]:
> {quote}
> Sooner or later users are going to ask for a command to update just the properties, or just add or remove a column, without having to spell out the entire new schema. ALTER TABLE SCHEMA ADD/REMOVE COLUMN/PROPERTY ...
> {quote}
> Syntax:
> {code:sql}
> alter schema  
> (for table dfs.tmp.nation | path '/tmp/schema.json')
> add [or replace]
> [columns (col1 int, col2 varchar)]
> [properties ('prop1'='val1', 'prop2'='val2')]
> {code}
> Add command will fail if column or property with the same name exists, unless OR REPLACE keywords are indicated.
> Add command will fail, if schema file does not exit.
> {code:sql}
> alter schema
> (for table dfs.tmp.nation | path '/tmp/schema.json')
> remove
> [columns (`col1`, `col2`)]
> [properties ('prop1', 'prop2')]
> {code}
> Remove command won't fail if column or property does not exist but will fail if schema file is absent.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)