You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sven Diedrichsen (JIRA)" <ji...@apache.org> on 2017/06/27 13:41:00 UTC

[jira] [Commented] (CASSANDRA-13535) Error decoding JSON for timestamp smaller than Integer.MAX_VALUE

    [ 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