cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject git commit: Fix dateOf() function for pre-2.0 timestamp columns
Date Mon, 26 Aug 2013 15:52:21 GMT
Updated Branches:
  refs/heads/cassandra-2.0.0 741aa31a0 -> 625d43f83


Fix dateOf() function for pre-2.0 timestamp columns

patch by Aleksey Yeschenko; reviewed by Sylvain Lebresne for
CASSANDRA-5928


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

Branch: refs/heads/cassandra-2.0.0
Commit: 625d43f83ecad4957aef5ef36bca10f559ddf9c8
Parents: 741aa31
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Mon Aug 26 18:49:49 2013 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Mon Aug 26 18:52:01 2013 +0300

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/625d43f8/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 7457b8d..5e1caf7 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,7 @@
 2.0.0
  * Fix thrift validation when inserting into CQL3 tables (CASSANDRA-5138)
  * Fix periodic memtable flushing behavior with clean memtables (CASSANDRA-5931)
+ * Fix dateOf() function for pre-2.0 timestamp columns (CASSANDRA-5928)
 Merged from 1.2:
  * Fix getBloomFilterDiskSpaceUsed for AlwaysPresentFilter (CASSANDRA-5900)
  * Don't announce schema version until we've loaded the changes locally

http://git-wip-us.apache.org/repos/asf/cassandra/blob/625d43f8/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 dda17e8..d3740e0 100644
--- a/src/java/org/apache/cassandra/db/marshal/DateType.java
+++ b/src/java/org/apache/cassandra/db/marshal/DateType.java
@@ -25,6 +25,7 @@ import java.util.Date;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import org.apache.cassandra.cql3.CQL3Type;
 import org.apache.cassandra.serializers.TypeSerializer;
 import org.apache.cassandra.serializers.TimestampSerializer;
 import org.apache.cassandra.serializers.MarshalException;
@@ -119,6 +120,12 @@ public class DateType extends AbstractType<Date>
         return false;
     }
 
+    @Override
+    public CQL3Type asCQL3Type()
+    {
+        return CQL3Type.Native.TIMESTAMP;
+    }
+
     public TypeSerializer<Date> getSerializer()
     {
         return TimestampSerializer.instance;


Mime
View raw message