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

Tyler Hobbs commented on CASSANDRA-8438:
----------------------------------------

bq. That's fair. Thanks for the info. Where should a person look to find out 
about decisions like this?

That's a good question.  It's technically a protocol-independent change, so I 
guess each of the native protocol specs should have their section on collection 
serialization updated.

However, that's not the most useful way to alert driver authors to changes like 
this.  Perhaps we should use a tag for any JIRA issues that affect the native 
protocol or type serialization?

> Nested collections not serialized with respect to native protocol version
> -------------------------------------------------------------------------
>
>                 Key: CASSANDRA-8438
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8438
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Adam Holmberg
>            Priority: Minor
>
> It appears that inner collections are not encoding collection element count 
> correctly for protocol version <=2
> {code}
> from cassandra.cluster import Cluster
> s = Cluster(protocol_version=2).connect()
> s.execute("CREATE KEYSPACE test WITH replication = {'class': 
> 'SimpleStrategy', 'replication_factor': '1'}")
> s.execute("CREATE TABLE test.test (k int PRIMARY KEY, v map<int, 
> frozen<list<int>>>)
> s.execute("INSERT INTO test.test (k, v ) VALUES ( 1, {1: [2,3,4]})")
> print s.execute("SELECT * FROM test.test")
> {code}
> The map returned is encoded as follows:
> 00:01:00:04:00:00:00:01:00:1c:*00:00:00:03*:*00:00:00:04*:00:00:00:02:*00:00:00:04*:00:00:00:03:*00:00:00:04*:00:00:00:04
> It appears that the outer collection encoding is as expected, while the inner 
> list count, and list element sizes are _int_ size, instead of _short_. This 
> does not manifest as a problem in cqlsh because it uses protocol version 3 by 
> default, which accepts this encoding.



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

Reply via email to