[jira] [Updated] (CASSANDRA-12371) INSERT JSON - numbers not accepted for smallint and tinyint

2016-08-16 Thread Michael Shuler (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Shuler updated CASSANDRA-12371:
---
Fix Version/s: (was: 3.9)
   3.8

> INSERT JSON - numbers not accepted for smallint and tinyint
> ---
>
> Key: CASSANDRA-12371
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12371
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
> Environment: Apache Cassandra 3.7 (provisioned by instaclustr.com, 
> running on AWS)
>Reporter: Paweł Rychlik
>Assignee: Paweł Rychlik
>Priority: Minor
>  Labels: lhf
> Fix For: 2.2.8, 3.0.9, 3.8
>
> Attachments: 12371-2.2.txt
>
>
> Contrary to what is written down on 
> http://cassandra.apache.org/doc/latest/cql/json.html#json-encoding-of-cassandra-data-types,
>  numbers are not an accepted format for tinyints and smallints.
> Steps to reproduce on CQLSH:
> > create table default.test(id text PRIMARY KEY, small smallint, tiny 
> > tinyint);
> > INSERT INTO default.test JSON '{"id":"123","small":11}';
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Error 
> decoding JSON value for small: Expected a short value, but got a Integer: 11"
> > INSERT INTO default.test JSON '{"id":"123","tiny":11}';
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Error 
> decoding JSON value for tiny: Expected a byte value, but got a Integer: 11"
> The good news is that when you wrap the numeric values into strings - it 
> works like a charm.



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


[jira] [Updated] (CASSANDRA-12371) INSERT JSON - numbers not accepted for smallint and tinyint

2016-08-05 Thread Tyler Hobbs (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tyler Hobbs updated CASSANDRA-12371:

Assignee: Paweł Rychlik

> INSERT JSON - numbers not accepted for smallint and tinyint
> ---
>
> Key: CASSANDRA-12371
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12371
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
> Environment: Apache Cassandra 3.7 (provisioned by instaclustr.com, 
> running on AWS)
>Reporter: Paweł Rychlik
>Assignee: Paweł Rychlik
>Priority: Minor
>  Labels: lhf
> Fix For: 2.2.8, 3.0.9, 3.9
>
> Attachments: 12371-2.2.txt
>
>
> Contrary to what is written down on 
> http://cassandra.apache.org/doc/latest/cql/json.html#json-encoding-of-cassandra-data-types,
>  numbers are not an accepted format for tinyints and smallints.
> Steps to reproduce on CQLSH:
> > create table default.test(id text PRIMARY KEY, small smallint, tiny 
> > tinyint);
> > INSERT INTO default.test JSON '{"id":"123","small":11}';
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Error 
> decoding JSON value for small: Expected a short value, but got a Integer: 11"
> > INSERT INTO default.test JSON '{"id":"123","tiny":11}';
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Error 
> decoding JSON value for tiny: Expected a byte value, but got a Integer: 11"
> The good news is that when you wrap the numeric values into strings - it 
> works like a charm.



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


[jira] [Updated] (CASSANDRA-12371) INSERT JSON - numbers not accepted for smallint and tinyint

2016-08-05 Thread Tyler Hobbs (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tyler Hobbs updated CASSANDRA-12371:

   Resolution: Fixed
Fix Version/s: (was: 3.0.x)
   (was: 2.2.x)
   (was: 3.x)
   3.9
   3.0.9
   2.2.8
   Status: Resolved  (was: Patch Available)

The rerun tests look good, so I've committed this as 
{{dc8a017c7909abc4086ecbb0540c75c88991ab73}} to 2.2 and merged up to 3.0, 3.9, 
and trunk.

Thanks again for the patch!

> INSERT JSON - numbers not accepted for smallint and tinyint
> ---
>
> Key: CASSANDRA-12371
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12371
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
> Environment: Apache Cassandra 3.7 (provisioned by instaclustr.com, 
> running on AWS)
>Reporter: Paweł Rychlik
>Priority: Minor
>  Labels: lhf
> Fix For: 2.2.8, 3.0.9, 3.9
>
> Attachments: 12371-2.2.txt
>
>
> Contrary to what is written down on 
> http://cassandra.apache.org/doc/latest/cql/json.html#json-encoding-of-cassandra-data-types,
>  numbers are not an accepted format for tinyints and smallints.
> Steps to reproduce on CQLSH:
> > create table default.test(id text PRIMARY KEY, small smallint, tiny 
> > tinyint);
> > INSERT INTO default.test JSON '{"id":"123","small":11}';
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Error 
> decoding JSON value for small: Expected a short value, but got a Integer: 11"
> > INSERT INTO default.test JSON '{"id":"123","tiny":11}';
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Error 
> decoding JSON value for tiny: Expected a byte value, but got a Integer: 11"
> The good news is that when you wrap the numeric values into strings - it 
> works like a charm.



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


[jira] [Updated] (CASSANDRA-12371) INSERT JSON - numbers not accepted for smallint and tinyint

2016-08-04 Thread JIRA

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paweł Rychlik updated CASSANDRA-12371:
--
Attachment: 12371-2.2.txt

> INSERT JSON - numbers not accepted for smallint and tinyint
> ---
>
> Key: CASSANDRA-12371
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12371
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
> Environment: Apache Cassandra 3.7 (provisioned by instaclustr.com, 
> running on AWS)
>Reporter: Paweł Rychlik
>Priority: Minor
>  Labels: lhf
> Fix For: 2.2.x, 3.0.x, 3.x
>
> Attachments: 12371-2.2.txt
>
>
> Contrary to what is written down on 
> http://cassandra.apache.org/doc/latest/cql/json.html#json-encoding-of-cassandra-data-types,
>  numbers are not an accepted format for tinyints and smallints.
> Steps to reproduce on CQLSH:
> > create table default.test(id text PRIMARY KEY, small smallint, tiny 
> > tinyint);
> > INSERT INTO default.test JSON '{"id":"123","small":11}';
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Error 
> decoding JSON value for small: Expected a short value, but got a Integer: 11"
> > INSERT INTO default.test JSON '{"id":"123","tiny":11}';
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Error 
> decoding JSON value for tiny: Expected a byte value, but got a Integer: 11"
> The good news is that when you wrap the numeric values into strings - it 
> works like a charm.



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


[jira] [Updated] (CASSANDRA-12371) INSERT JSON - numbers not accepted for smallint and tinyint

2016-08-04 Thread JIRA

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paweł Rychlik updated CASSANDRA-12371:
--
Reviewer: Tyler Hobbs
  Status: Patch Available  (was: Open)

> INSERT JSON - numbers not accepted for smallint and tinyint
> ---
>
> Key: CASSANDRA-12371
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12371
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
> Environment: Apache Cassandra 3.7 (provisioned by instaclustr.com, 
> running on AWS)
>Reporter: Paweł Rychlik
>Priority: Minor
>  Labels: lhf
> Fix For: 2.2.x, 3.0.x, 3.x
>
>
> Contrary to what is written down on 
> http://cassandra.apache.org/doc/latest/cql/json.html#json-encoding-of-cassandra-data-types,
>  numbers are not an accepted format for tinyints and smallints.
> Steps to reproduce on CQLSH:
> > create table default.test(id text PRIMARY KEY, small smallint, tiny 
> > tinyint);
> > INSERT INTO default.test JSON '{"id":"123","small":11}';
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Error 
> decoding JSON value for small: Expected a short value, but got a Integer: 11"
> > INSERT INTO default.test JSON '{"id":"123","tiny":11}';
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Error 
> decoding JSON value for tiny: Expected a byte value, but got a Integer: 11"
> The good news is that when you wrap the numeric values into strings - it 
> works like a charm.



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


[jira] [Updated] (CASSANDRA-12371) INSERT JSON - numbers not accepted for smallint and tinyint

2016-08-03 Thread Tyler Hobbs (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tyler Hobbs updated CASSANDRA-12371:

Since Version: 2.2.0 beta 1  (was: 3.7)
   Labels: lhf  (was: )
 Priority: Minor  (was: Major)
Fix Version/s: 3.x
   3.0.x
   2.2.x

It looks like when these types were added, there were no updates to 
{{JsonTest.java}} to cover them.  As the error message indicates, we're 
explicitly checking {{instanceof Byte}} and {{instanceof Short}}, which is 
probably not the correct thing to do, although it may be possible to get 
jackson to return these types instead of an Integer.

> INSERT JSON - numbers not accepted for smallint and tinyint
> ---
>
> Key: CASSANDRA-12371
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12371
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
> Environment: Apache Cassandra 3.7 (provisioned by instaclustr.com, 
> running on AWS)
>Reporter: Paweł Rychlik
>Priority: Minor
>  Labels: lhf
> Fix For: 2.2.x, 3.0.x, 3.x
>
>
> Contrary to what is written down on 
> http://cassandra.apache.org/doc/latest/cql/json.html#json-encoding-of-cassandra-data-types,
>  numbers are not an accepted format for tinyints and smallints.
> Steps to reproduce on CQLSH:
> > create table default.test(id text PRIMARY KEY, small smallint, tiny 
> > tinyint);
> > INSERT INTO default.test JSON '{"id":"123","small":11}';
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Error 
> decoding JSON value for small: Expected a short value, but got a Integer: 11"
> > INSERT INTO default.test JSON '{"id":"123","tiny":11}';
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Error 
> decoding JSON value for tiny: Expected a byte value, but got a Integer: 11"
> The good news is that when you wrap the numeric values into strings - it 
> works like a charm.



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