cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1084674 - in /cassandra/branches/cassandra-0.7: CHANGES.txt src/java/org/apache/cassandra/cli/Cli.g test/unit/org/apache/cassandra/cli/CliTest.java
Date Wed, 23 Mar 2011 18:56:22 GMT
Author: jbellis
Date: Wed Mar 23 18:56:21 2011
New Revision: 1084674

URL: http://svn.apache.org/viewvc?rev=1084674&view=rev
Log:
allow negative numbers in the cli
patch by Pavel Yaskevich; reviewed by jbellis for CASSANDRA-2358

Modified:
    cassandra/branches/cassandra-0.7/CHANGES.txt
    cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/Cli.g
    cassandra/branches/cassandra-0.7/test/unit/org/apache/cassandra/cli/CliTest.java

Modified: cassandra/branches/cassandra-0.7/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/CHANGES.txt?rev=1084674&r1=1084673&r2=1084674&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.7/CHANGES.txt Wed Mar 23 18:56:21 2011
@@ -17,6 +17,7 @@
  * fix potential infinite loop in ByteBufferUtil.inputStream (CASSANDRA-2365)
  * fix encoding bugs in HintedHandoffManager, SystemTable when default
    charset is not UTF8 (CASSANDRA-2367)
+ * allow negative numbers in the cli (CASSANDRA-2358)
 
 
 0.7.4

Modified: cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/Cli.g
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/Cli.g?rev=1084674&r1=1084673&r2=1084674&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/Cli.g (original)
+++ cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/Cli.g Wed Mar 23 18:56:21
2011
@@ -569,6 +569,7 @@ Alnum
 // syntactic Elements
 IntegerLiteral
    : Digit+
+   | '-' Digit+
    ;
    
 DoubleLiteral

Modified: cassandra/branches/cassandra-0.7/test/unit/org/apache/cassandra/cli/CliTest.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/test/unit/org/apache/cassandra/cli/CliTest.java?rev=1084674&r1=1084673&r2=1084674&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/test/unit/org/apache/cassandra/cli/CliTest.java (original)
+++ cassandra/branches/cassandra-0.7/test/unit/org/apache/cassandra/cli/CliTest.java Wed Mar
23 18:56:21 2011
@@ -39,7 +39,11 @@ public class CliTest extends CleanupHelp
         "use TestKeySpace;",
         "create column family CF1 with comparator=UTF8Type and column_metadata=[{ column_name:world,
validation_class:IntegerType, index_type:0, index_name:IdxName }, { column_name:world2, validation_class:LongType,
index_type:KEYS, index_name:LongIdxName}];",
         "set CF1[hello][world] = 123848374878933948398384;",
+        "set CF1[hello][-31337] = 'some string value';",
+        "get CF1[hello][-31337];",
         "get CF1[hello][world];",
+        "set CF1[hello][-31337] = -23876;",
+        "set CF1[hello][-31337] = long(-23876);",
         "set CF1[hello][world2] = 15;",
         "get CF1 where world2 = long(15);",
         "get cF1 where world2 = long(15);",
@@ -79,6 +83,10 @@ public class CliTest extends CleanupHelp
         "del SCF1['hello'][1][9999];",
         "get SCF1['hello'][1][9999];",
         "set SCF1['hello'][1][9999] = Long(1234);",
+        "set SCF1['hello'][-1][-12] = Long(5678);",
+        "get SCF1['hello'][-1][-12];",
+        "set SCF1['hello'][-1][-12] = -340897;",
+        "set SCF1['hello'][-1][-12] = integer(-340897);",
         "del SCF1['hello'][9999];",
         "get SCF1['hello'][1][9999];",
         "truncate CF1;",



Mime
View raw message