You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Benjamin Lerer (Jira)" <ji...@apache.org> on 2021/09/03 15:45:00 UTC

[jira] [Commented] (CASSANDRA-16916) Add support for IF EXISTS and IF NOT EXISTS in ALTER statements

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

Benjamin Lerer commented on CASSANDRA-16916:
--------------------------------------------

[~djanand] I understood that you were interested in working on low-hanging fruits ticket. This one might be interesting for you. If you have some questions do not hesitate to ping me. 

> Add support for IF EXISTS and IF NOT EXISTS in ALTER statements
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-16916
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16916
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: CQL/Syntax
>            Reporter: Benjamin Lerer
>            Priority: Normal
>
> It would make sense to add support for {{IF EXISTS}} and {{IF NOT EXISTS}} in the different {{ALTER}} statements. 
> For example:
> * {{ALTER TABLE IF EXISTS myTable ...}}
> * {{ALTER TABLE myTable ADD IF NOT EXISTS ...}}
> * {{ALTER TABLE myTable DROP IF EXISTS ...}}
> * {{ALTER TYPE IF EXISTS myType ...}}
> * {{ALTER TYPE myType ADD IF NOT EXISTS ...}}
> +Additional info for newcomers:+
> In order to implement this change you will need to change the {{Parser.g}} ANTLR file located in the src/antlr directory and the java classes corresponding to the different alter statements located in the {{org.apache.cassandra.cql3.statements.schema}} package. You can look at the CreateTableStatement class to see how it was done there.
> The unit test for the CQL logic are located under {{org.apache.cassandra.cql3.validation}}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org