[ https://issues.apache.org/jira/browse/CASSANDRA-6956?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sylvain Lebresne updated CASSANDRA-6956: ---------------------------------------- Attachment: 6956.txt Currently the columnCounter will count the static "block" as one row which throw off LIMIT. Attaching a patch to fix that. > SELECT ... LIMIT offset by 1 with static columns > ------------------------------------------------ > > Key: CASSANDRA-6956 > URL: https://issues.apache.org/jira/browse/CASSANDRA-6956 > Project: Cassandra > Issue Type: Bug > Environment: cqlsh 4.1.1 | Cassandra 2.0.6 | CQL spec 3.1.1 > Reporter: Pavel Eremeev > Assignee: Sylvain Lebresne > Fix For: 2.0.7 > > Attachments: 6956.txt > > > First, repro case: > {code} > cqlsh:test> create table test ( pk1 text, pk2 timeuuid, data1 text static, > data2 text, PRIMARY KEY( pk1, pk2 ) ); > cqlsh:test> update test set data1 = 'data1', data2 = 'data2' where pk1 = > 'pk1' and pk2 = now(); > cqlsh:test> update test set data1 = 'data1', data2 = 'data2' where pk1 = > 'pk1' and pk2 = now(); > cqlsh:test> select * from test limit 1; > pk1 | pk2 | data1 | data2 > -----+------+-------+------- > pk1 | null | data1 | null > (1 rows) > cqlsh:test> select * from test limit 2; > pk1 | pk2 | data1 | data2 > -----+--------------------------------------+-------+------- > pk1 | 9b068ee0-b8b0-11e3-a345-49baa9ac32e6 | data1 | data2 > (1 rows) > cqlsh:test> select * from test limit 3; > pk1 | pk2 | data1 | data2 > -----+--------------------------------------+-------+------- > pk1 | 9b068ee0-b8b0-11e3-a345-49baa9ac32e6 | data1 | data2 > pk1 | 0af67a40-b8ba-11e3-a345-49baa9ac32e6 | data1 | data2 > (2 rows) > {code} > I think that: 1) if this is a static columns feature it should be documented > so I can use it safely or 2) it should be fixed (return 2 rows with limit 2 > for query above). -- This message was sent by Atlassian JIRA (v6.2#6252)