cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [01/12] git commit: Support negative timestamps in DateType.fromString
Date Wed, 19 Feb 2014 16:01:25 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 55d8da44b -> 84103bbe2
  refs/heads/cassandra-2.1 5afd2bd48 -> 8e101bef0
  refs/heads/trunk 89b8b1a75 -> 97a529f06


Support negative timestamps in DateType.fromString

patch by slebresne; reviewed by iamaleksey for CASSANDRA-6718


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

Branch: refs/heads/cassandra-2.1
Commit: e787b7a4c7f69cf486c7d5b6c53bfb88086b5261
Parents: 6dfca3d
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Wed Feb 19 11:41:21 2014 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Wed Feb 19 11:41:21 2014 +0100

----------------------------------------------------------------------
 CHANGES.txt                                            | 1 +
 src/java/org/apache/cassandra/db/marshal/DateType.java | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e787b7a4/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index f146166..47fc3a3 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -10,6 +10,7 @@
  * IN on the last clustering columns + ORDER BY DESC yield no results (CASSANDRA-6701)
  * Fix SecondaryIndexManager#deleteFromIndexes() (CASSANDRA-6711)
  * Fix snapshot repair not snapshotting coordinator itself (CASSANDRA-6713)
+ * Support negative timestamps for CQL3 dates in query string (CASSANDRA-6718)
 
 
 1.2.15

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e787b7a4/src/java/org/apache/cassandra/db/marshal/DateType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/DateType.java b/src/java/org/apache/cassandra/db/marshal/DateType.java
index 875169d..ad165ee 100644
--- a/src/java/org/apache/cassandra/db/marshal/DateType.java
+++ b/src/java/org/apache/cassandra/db/marshal/DateType.java
@@ -92,7 +92,7 @@ public class DateType extends AbstractType<Date>
           millis = System.currentTimeMillis();
       }
       // Milliseconds since epoch?
-      else if (source.matches("^\\d+$"))
+      else if (source.matches("^-?\\d+$"))
       {
           try
           {


Mime
View raw message