cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <>
Subject [jira] [Updated] (CASSANDRA-6212) TimestampType doesn't support pre-epoch long
Date Mon, 21 Oct 2013 04:03:43 GMT


Jonathan Ellis updated CASSANDRA-6212:

    Assignee: Mikhail Stepura  (was: Lyuben Todorov)

> TimestampType doesn't support pre-epoch long
> --------------------------------------------
>                 Key: CASSANDRA-6212
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API, Core
>            Reporter: Simon Hopkin
>            Assignee: Mikhail Stepura
>            Priority: Minor
>             Fix For: 2.0.2
> 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 could use formatted date strings instead, but the TimestampType date parser uses ISO8601
patterns which would cause the timestamp to be rounded to the nearest second.
> Currently I get the following exception message:
> unable to coerce '-86400000' to a  formatted date (long)

This message was sent by Atlassian JIRA

View raw message