You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Simon Hopkin (JIRA)" <ji...@apache.org> on 2013/10/17 12:17:41 UTC

[jira] [Updated] (CASSANDRA-6212) TimestampType doesn't support pre-epoch long

     [ https://issues.apache.org/jira/browse/CASSANDRA-6212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Hopkin updated CASSANDRA-6212:
------------------------------------

    Description: 
org.apache.cassandra.db.marshal.TimestampType.dateStringToTimestamp() contains a regular expression that checks to see if the String argument contains a number.  If so it parses it as a long timestamp.  However pre-epoch timestamps are negative and the code doesn't account for this so it tries to parse it as a formatted Date.  A tweak to the regular expression in TimestampType.dateStringToTimestamp() would solve this issue.

I can get around this issue by using formatted data types but fixing this would mean I could go back to using timestamps.

Currently I get the following exception message:

unable to coerce '-86400000' to a  formatted date (long)



  was:
org.apache.cassandra.db.marshal.TimestampType contains a regular expression that checks to see if the String argument contains a number.  If so it parses it as a long timestamp.  However pre-epoch timestamps are negative and the code doesn't account for this so it tries to parse it as a formatted Date.  A tweak to the regular expression in TimestampType.dateStringToTimestamp() would solve this issue.

I can get around this issue by using formatted data types but fixing this would mean I could go back to using timestamps.

Currently I get the following exception message:

unable to coerce '-86400000' to a  formatted date (long)




> TimestampType doesn't support pre-epoch long
> --------------------------------------------
>
>                 Key: CASSANDRA-6212
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6212
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Simon Hopkin
>
> org.apache.cassandra.db.marshal.TimestampType.dateStringToTimestamp() contains a regular expression that checks to see if the String argument contains a number.  If so it parses it as a long timestamp.  However pre-epoch timestamps are negative and the code doesn't account for this so it tries to parse it as a formatted Date.  A tweak to the regular expression in TimestampType.dateStringToTimestamp() would solve this issue.
> I can get around this issue by using formatted data types but fixing this would mean I could go back to using timestamps.
> Currently I get the following exception message:
> unable to coerce '-86400000' to a  formatted date (long)



--
This message was sent by Atlassian JIRA
(v6.1#6144)