cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eev...@apache.org
Subject svn commit: r1081538 - in /cassandra/trunk: src/java/org/apache/cassandra/cql/Cql.g test/system/test_cql.py
Date Mon, 14 Mar 2011 19:42:52 GMT
Author: eevans
Date: Mon Mar 14 19:42:52 2011
New Revision: 1081538

URL: http://svn.apache.org/viewvc?rev=1081538&view=rev
Log:
more flexible keyword argument specification

Patch by eevans for CASSANDRA-2027

Modified:
    cassandra/trunk/src/java/org/apache/cassandra/cql/Cql.g
    cassandra/trunk/test/system/test_cql.py

Modified: cassandra/trunk/src/java/org/apache/cassandra/cql/Cql.g
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cql/Cql.g?rev=1081538&r1=1081537&r2=1081538&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cql/Cql.g (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cql/Cql.g Mon Mar 14 19:42:52 2011
@@ -230,8 +230,8 @@ createKeyspaceStatement returns [CreateK
           Map<String, String> attrs = new HashMap<String, String>();
       }
       K_CREATE K_KEYSPACE keyspace=( IDENT | STRING_LITERAL | INTEGER )
-          K_WITH  a1=( COMPIDENT | IDENT ) '=' v1=( STRING_LITERAL | INTEGER ) { attrs.put($a1.text,
$v1.text); }
-          ( K_AND aN=( COMPIDENT | IDENT ) '=' vN=( STRING_LITERAL | INTEGER ) { attrs.put($aN.text,
$vN.text); } )*
+          K_WITH  a1=( COMPIDENT | IDENT ) '=' v1=( STRING_LITERAL | INTEGER | IDENT ) {
attrs.put($a1.text, $v1.text); }
+          ( K_AND aN=( COMPIDENT | IDENT ) '=' vN=( STRING_LITERAL | INTEGER | IDENT ) {
attrs.put($aN.text, $vN.text); } )*
           endStmnt
       {
           return new CreateKeyspaceStatement($keyspace.text, attrs);
@@ -264,7 +264,7 @@ createCfamColumnValidator returns [Strin
 
 createCfamKeywordArgument returns [String arg]
     : comparatorType { $arg = $comparatorType.text; }
-    | value=( STRING_LITERAL | INTEGER | FLOAT ) { $arg = $value.text; }
+    | value=( STRING_LITERAL | IDENT | INTEGER | FLOAT ) { $arg = $value.text; }
     ;
 
 /** CREATE INDEX [indexName] ON columnFamily (columnName); */

Modified: cassandra/trunk/test/system/test_cql.py
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/system/test_cql.py?rev=1081538&r1=1081537&r2=1081538&view=diff
==============================================================================
--- cassandra/trunk/test/system/test_cql.py (original)
+++ cassandra/trunk/test/system/test_cql.py Mon Mar 14 19:42:52 2011
@@ -338,7 +338,7 @@ class TestCql(ThriftTester):
         conn = init()
         conn.execute("""
         CREATE KEYSPACE Keyspace4Drop
-            WITH strategy_class = 'SimpleStrategy' AND replication_factor = 1
+            WITH strategy_class = SimpleStrategy AND replication_factor = 1
         """)
         
         # TODO: temporary (until this can be done with CQL).



Mime
View raw message