You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jogesh Anand (Jira)" <ji...@apache.org> on 2021/11/14 23:07:00 UTC

[jira] [Comment Edited] (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=17443485#comment-17443485 ] 

Jogesh Anand edited comment on CASSANDRA-16916 at 11/14/21, 11:06 PM:
----------------------------------------------------------------------

[~blerer] / @ mentors - thanks for your patience. I modified some alter statements as mentioned in the Jira above. Please have an initial look when you get some time. Here's [CI link|https://app.circleci.com/pipelines/github/djanand/cassandra?branch=CASSANDRA-16916] (currently running). I have had issues with test cases in previous tickets (pre 4.0 merge or thereabouts) that run fine locally but the CircleCI breaks. I'll keep an eye out.  Can you please help with the below:-
 * Would it be helpful to have IF EXISTS on ALTER TABLE %s RENAME statements?
 * ALTER ROLE,  ALTER MATERIALIZED VIEW, and ALTER USER is WIP and will be sharing those changes in a couple of days.
 * I'm not sure how I could join #cassandra-dev slack channel. I don't have an @apache.org email, so if someone sends an invite my way that would be pretty helpful.


was (Author: djanand):
[~blerer] / @ mentors - thanks for your patience. I modified some alter statements as mentioned in the Jira above. Please have an initial look when you get some time. Here's [CI link|https://app.circleci.com/pipelines/github/djanand/cassandra?branch=CASSANDRA-16916] (currently running). I have had issues with test cases that run fine locally but the CircleCI breaks. I'll keep an eye out.  Can you please help with the below:-
 * Would it be helpful to have IF EXISTS on ALTER TABLE %s RENAME statements?
 * ALTER ROLE,  ALTER MATERIALIZED VIEW, and ALTER USER is WIP and will be sharing those changes in a couple of days.
 * I'm not sure how I could join #cassandra-dev slack channel. I don't have an @apache.org email, so if someone sends an invite my way that would be pretty helpful.

> 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
>
> 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: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org