[ 
https://issues.apache.org/jira/browse/CASSANDRA-4497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sylvain Lebresne updated CASSANDRA-4497:
----------------------------------------

    Attachment: 4497-v2.txt


Since we're breaking from earlier version of CQL3 anyway (and we've been clear 
that CQL3 has been beta so far), I would be in favor of shortening some options 
names (some were in Pavel's patch already but not all) as said previous.

I'm attaching a v2 based on Pavel's patch that does that. So that the exact 
syntax is:
{noformat}
CREATE KEYSPACE foo WITH replication = { 'class' : 'SimpleStrategy',  
'replication_factor' : 1 }
CREATE TABLE .... WITH compression = { ... }
                   AND compaction = { 'class' : 'SizeTieredCompactionStrategy', 
'min_threshold' : 2, 'max_threshold' : 4 }
{noformat}

v2 also slightly update the grammar to better reuse code between create and 
alter table, and it fixes a potential NPE in the grammar convertMap method (due 
to antlr being a smart-ass). It also throw a ConfiguarionException in the case 
were compaction options are given but not the 'class' itself (since that feels 
more consistent with the semantic of having a map literal).

bq. it looks like there isn't any way to change one option and leave the other 
intact (like "WITH replication['replication_factor'] = 2"

I agree, but that's a bit of a pain to add (in particular things like "WITH 
replication = { 'class' : 'SimpleStrategy} AND 
replication['replication_factor'] = 2" are a bit annoying to handle) so I would 
suggest leaving that to later.

                
> Update CQL pseudo-maps to real maps
> -----------------------------------
>
>                 Key: CASSANDRA-4497
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4497
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.2.0 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>              Labels: cql3
>             Fix For: 1.2.0 beta 1
>
>         Attachments: 4497-v2.txt, CASSANDRA-4497.patch
>
>
> - compression_parameters
> - replication_parameters (combine strategy + options like we did compression)
> - anything else?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to