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: [email protected]
For additional commands, e-mail: [email protected]