You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jeremy Hanna (JIRA)" <ji...@apache.org> on 2016/08/02 17:00:25 UTC

[jira] [Comment Edited] (CASSANDRA-12360) Unable to parse negative dates

    [ https://issues.apache.org/jira/browse/CASSANDRA-12360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15404386#comment-15404386 ] 

Jeremy Hanna edited comment on CASSANDRA-12360 at 8/2/16 5:00 PM:
------------------------------------------------------------------

{code}
cqlsh:jeremy> create table jeremy.testdate (d date primary key);
cqlsh:jeremy> INSERT INTO testdate (d) VALUES ('-0407-12-27T00:00:00Z');
InvalidRequest: Error from server: code=2200 [Invalid query] message="Unable to coerce '-0407-12-27T00:00:00Z' to a formatted date (long)"
{code}

The {{date}} type should be able to go to negative values to accommodate BC years but it looks like we have a bug.


was (Author: jeromatron):
{code}
[cqlsh:jeremy> create table jeremy.testdate (d date primary key);
cqlsh:jeremy> INSERT INTO testdate (d) VALUES ('-0407-12-27T00:00:00Z');
InvalidRequest: Error from server: code=2200 [Invalid query] message="Unable to coerce '-0407-12-27T00:00:00Z' to a formatted date (long)"
{code}

The {{date}} type should be able to go to negative values to accommodate BC years but it looks like we have a bug.

> Unable to parse negative dates
> ------------------------------
>
>                 Key: CASSANDRA-12360
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12360
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Bryn Cooke
>
> {code}
> cqlsh:date_test> DESC test;
> CREATE TABLE date_test.test (
>     date timestamp PRIMARY KEY
> ) ...
> cqlsh:date_test> INSERT INTO test (date) VALUES ('-0407-12-27T00:00:00Z');
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Unable to coerce '-0407-12-27T00:00:00Z' to a formatted date (long)"
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)