[
https://issues.apache.org/jira/browse/CASSANDRA-16916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17477492#comment-17477492
]
Jogesh Anand commented on CASSANDRA-16916:
------------------------------------------
thanks [~e.dimitrova] for clarifying that information. No worries. Yeah, I
will cherry-pick commits on top of trunk and the post in the thread. I'm
planning to have it this week and update here for you/Benjamin to run CI/
review.
Yeah, I ran pytests locally on virtualenv and using a single node ccm cluster,
but wasn't very aware of dtests repo. Thanks for making me aware. Since, dtests
were the ones failing, I'll use the latest trunk, make my changes on top of it
and then run dtests. Do you think these changes require some new dtests?
> 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]