cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject git commit: Allow hyphens in keyspace properties (CQL3)
Date Tue, 29 May 2012 08:48:03 GMT
Updated Branches:
  refs/heads/cassandra-1.1 1d9b7f559 -> 5177d56f3


Allow hyphens in keyspace properties (CQL3)

patch by slebresne; reviewed by xedin for CASSANDRA-4278


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5177d56f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5177d56f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5177d56f

Branch: refs/heads/cassandra-1.1
Commit: 5177d56f35698c00d58224df65c3b2fa550fc25f
Parents: 1d9b7f5
Author: Sylvain Lebresne <sylvain@riptano.com>
Authored: Tue May 29 10:47:01 2012 +0200
Committer: Sylvain Lebresne <sylvain@riptano.com>
Committed: Tue May 29 10:47:01 2012 +0200

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 src/java/org/apache/cassandra/cql3/CFPropDefs.java |    2 +-
 src/java/org/apache/cassandra/cql3/Cql.g           |    8 ++------
 3 files changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5177d56f/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 2709320..c692bc4 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -64,6 +64,7 @@
  * (cql3) Fix range queries with secondary indexes (CASSANDRA-4257)
  * Better error messages from improper input in cli (CASSANDRA-3865)
  * Try to stop all compaction upon Keyspace or ColumnFamily drop (CASSANDRA-4221)
+ * (cql3) Allow keyspace properties to contain hyphens (CASSANDRA-4278)
 Merged from 1.0:
  * Fix super columns bug where cache is not updated (CASSANDRA-4190)
  * fix maxTimestamp to include row tombstones (CASSANDRA-4116)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5177d56f/src/java/org/apache/cassandra/cql3/CFPropDefs.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/CFPropDefs.java b/src/java/org/apache/cassandra/cql3/CFPropDefs.java
index 4fc9f5f..04f0b41 100644
--- a/src/java/org/apache/cassandra/cql3/CFPropDefs.java
+++ b/src/java/org/apache/cassandra/cql3/CFPropDefs.java
@@ -247,7 +247,7 @@ public class CFPropDefs
         return result;
     }
 
-
+    @Override
     public String toString()
     {
         return String.format("CFPropDefs(%s, compaction: %s, compression: %s)",

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5177d56f/src/java/org/apache/cassandra/cql3/Cql.g
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/Cql.g b/src/java/org/apache/cassandra/cql3/Cql.g
index 5123cbb..1900538 100644
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@ -72,7 +72,6 @@ options {
         if (op == null && (value.isBindMarker() || Long.parseLong(value.getText())
> 0))
             throw new MissingTokenException(102, stream, value);
     }
-
 }
 
 @lexer::header {
@@ -499,7 +498,8 @@ termPairWithOperation[Map<ColumnIdentifier, Operation> columns]
     ;
 
 property returns [String str]
-    : p=(COMPIDENT | IDENT) { $str = $p.text; }
+    @init{ StringBuilder sb = new StringBuilder(); }
+    : c1=cident { sb.append(c1); } ( ':' cn=cident { sb.append(':').append(cn); } )* { $str
= sb.toString(); }
     ;
 
 propertyValue returns [String str]
@@ -704,10 +704,6 @@ IDENT
     : LETTER (LETTER | DIGIT | '_')*
     ;
 
-COMPIDENT
-    : IDENT ( ':' (IDENT | INTEGER))+
-    ;
-
 UUID
     : HEX HEX HEX HEX HEX HEX HEX HEX '-'
       HEX HEX HEX HEX '-'


Mime
View raw message