cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sven Diedrichsen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-13535) Error decoding JSON for timestamp smaller than Integer.MAX_VALUE
Date Tue, 27 Jun 2017 13:41:00 GMT

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

Sven Diedrichsen commented on CASSANDRA-13535:
----------------------------------------------

This has also been reproduced in version 3.11.

> Error decoding JSON for timestamp smaller than Integer.MAX_VALUE
> ----------------------------------------------------------------
>
>                 Key: CASSANDRA-13535
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13535
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Jeremy Nguyen Xuan
>
> When trying to insert a JSON with field of type timestamp, the field is decoded as an
Integer instead as a Long.
> {code}
> CREATE TABLE foo.bar (
> myfield timestamp,
> PRIMARY KEY (myfield)
> );
> cqlsh:foo> INSERT INTO bar JSON '{"myfield":0}';
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Error decoding
JSON value for myfield: Expected a long or a datestring representation of a timestamp value,
but got a Integer: 0"
> cqlsh:foo> INSERT INTO bar JSON '{"myfield":2147483647}';
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Error decoding
JSON value for myfield: Expected a long or a datestring representation of a timestamp value,
but got a Integer: 2147483647"
> cqlsh:foo> INSERT INTO bar JSON '{"myfield":2147483648}';
> cqlsh:foo> 
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message