[ https://issues.apache.org/jira/browse/CASSANDRA-8438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14238085#comment-14238085 ]
Adam Holmberg commented on CASSANDRA-8438: ------------------------------------------ That's fair. Thanks for the info. Where should a person look to find out about decisions like this? > 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)