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

Ekaterina Dimitrova edited comment on CASSANDRA-16916 at 1/13/22, 8:23 PM:
---------------------------------------------------------------------------

Hi Jogesh,

First, I want to apologize, there was some misunderstanding. The patch should 
be applied to trunk and not cassandra-4.0. Any improvements and new features go 
to trunk as per our release lifecycle. I just updated the ticket. Apologize for 
that misunderstanding. 

On the bright side I don't think there will be a huge difference and 
significant conflicts. You might want to cherry-pick your changes on top of 
trunk. I can run a CI for you and verify if I have something to add to 
Benjamin's review. 

In regards to the CI I ran, it seems outdated as it is not on top of the 
changes you added the next day. Quick question - are you familiar with the 
DTests? I noticed there were a few DTests failing. If not, a good start to 
learn how those work is the DTest repo [README 
|https://github.com/apache/cassandra-dtest#cassandra-distributed-tests-dtests]. 
Also, please, feel free to reach out with any questions you might have while 
looking into that. We have a more general page around the tests we run 
[here|https://cassandra.apache.org/_/development/testing.html]. 


was (Author: e.dimitrova):
Hi Jogesh,

First, I want to apologize, there was some misunderstanding. The patch should 
be applied to trunk and not cassandra-4.0. Any improvements and new features go 
to trunk as per our release lifecycle. I just updated the ticket. Apologize for 
that misunderstanding. 

On the bright side I don't think there will be a huge difference and many 
changes needed. You might want to cherry-pick your changes on top of trunk. I 
can run a CI for you and verify if I have something to add to Benjamin's 
review. 

In regards to the CI I ran, it seems outdated as it is not on top of the 
changes you added the next day. Quick question - are you familiar with the 
DTests? I noticed there were a few DTests failing. If not, a good start to 
learn how those work is the DTest repo [README 
|https://github.com/apache/cassandra-dtest#cassandra-distributed-tests-dtests]. 
Also, please, feel free to reach out with any questions you might have while 
looking into that. We have a more general page around the tests we run 
[here|https://cassandra.apache.org/_/development/testing.html]. 

> 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]

Reply via email to