[
https://issues.apache.org/jira/browse/CASSANDRA-16916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17502542#comment-17502542
]
Jogesh Anand edited comment on CASSANDRA-16916 at 3/7/22, 8:19 PM:
-------------------------------------------------------------------
Thanks [~e.dimitrova] - rebased the PR on latest trunk, after squashing my
commits into 1. Can see all latest commits from upstream
_apache/cassandra:trunk_ in my
[branch|https://github.com/djanand/cassandra/commits/trunk-16916] . Could you
please review ?
was (Author: djanand):
Thanks [~e.dimitrova] - rebased the PR on latest trunk, after squashing my
commits into 1. Can see all latest commits from upstream
_apache/cassandra:trunk _in my
[branch|https://github.com/djanand/cassandra/commits/trunk-16916] . Could you
please review ?
> 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
> Assignee: Jogesh Anand
> Priority: Normal
> Fix For: 4.x
>
>
> 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.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]