[ https://issues.apache.org/jira/browse/CASSANDRA-17184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17464711#comment-17464711 ]
Aleksandr Volochnev edited comment on CASSANDRA-17184 at 12/23/21, 5:15 PM: ---------------------------------------------------------------------------- Yay! Prototype works!!! Many thanks to [~Gerrrr] for his support, it would be much uglier without his input! [~blerer] The proposed approach is based on `ALTER KEYSPACE` statement as the easiest to modify. I'm to push it to my fork so we could discuss it. Please notice it works but is definitely +not ready+ for merge. !image-2021-12-23-18-13-42-644.png! !image-2021-12-23-18-13-15-894.png|width=849,height=207! was (Author: JIRAUSER281282): Yay! Prototype works!!! Many thanks to [~Gerrrr] for his support, it would be much uglier without his input! [~blerer] The proposed approach is based on `ALTER KEYSPACE` statement as the easiest to modify. I'm to push it to my fork so we could discuss it. Please notice it works but is definitely +not ready+ for merge. !image-2021-12-23-18-13-42-644.png! !image-2021-12-23-18-13-15-894.png! > Add += and -= syntax to ALTER TABLE WITH > ---------------------------------------- > > Key: CASSANDRA-17184 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17184 > Project: Cassandra > Issue Type: Improvement > Components: CQL/Syntax > Reporter: Benjamin Lerer > Assignee: Aleksandr Volochnev > Priority: Normal > Labels: AdventCalendar2021, lhf > Fix For: 4.x > > Attachments: image-2021-12-12-20-36-11-995.png, > image-2021-12-23-18-13-15-894.png, image-2021-12-23-18-13-42-644.png > > > We have 2 types of table properties in CQL: simple ones (comment, > gc_grace_seconds, ...), which are basically of type text (even if, we > historically allow constants of any type) and complex ones (compaction, > caching...), which are basically map<text, text>. > The only syntax that {{ALTER TABLE WITH}} supports is of setting a property, > and so for the later kind, we basically always have to provide the new full > map for the option. To take an example, say you have a table with compaction > and want to enable compaction logging you will have to provide the all map. > In order to avoid that problem we can add support for the {{+=}} (and {{-=}} > ideally) syntax that already exists for maps otherwise, and support: > {code} > ALTER TABLE t WITH compaction+= { 'log_all' : 'true' } > {code} > +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. > 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-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org