cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Nguyen Xuan (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CASSANDRA-13535) Error decoding JSON for timestamp smaller than Integer.MAX_VALUE
Date Wed, 17 May 2017 08:42:04 GMT
Jeremy Nguyen Xuan created CASSANDRA-13535:
----------------------------------------------

             Summary: 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.3.15#6346)

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


Mime
View raw message