[ https://issues.apache.org/jira/browse/CASSANDRA-2717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13062376#comment-13062376 ]
Jim Ancona commented on CASSANDRA-2717: --------------------------------------- I added some tests to test/system/test_cql.py. I found that not only did "WHERE KEY = 'bar' and KEY = 'bar'" return two rows, so did "WHERE KEY = 'bar' and KEY = 'baz'" and "WHERE KEY IN ('bar', 'bar')" The attached patch makes having more than one "KEY =" clause be an error, and changes the List of keys in WhereClause to a Set. Jonathan mentioned that OR support was added, but I didn't see that in cassandra-0.8. Am I looking at the wrong branch? If so, this patch will have to be reworked, along with the logic in WhereClause. > duplicate rows returned from SELECT where KEY term is duplicated > ---------------------------------------------------------------- > > Key: CASSANDRA-2717 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2717 > Project: Cassandra > Issue Type: Bug > Components: Core > Affects Versions: 0.8.0 beta 2 > Reporter: Aaron Morton > Assignee: Jim Ancona > Priority: Minor > Labels: cql, lhf > Attachments: > v1-0001-CASSANDRA-2717-Prevent-multiple-KEY-terms-properly-han.txt > > > Noticed while working on CASSANDRA-2268 when random keys generated during a > mutli_get test contain duplicate keys. > The thrift multiget_slice() returns only the unique rows because of the map > generated for the result. > CQL will return a row for each KEY term in the SELECT. > I could make QueryProcessor.getSlice() only create commands for the unique > keys if we wanted to. > Not sure it's a bug and it's definitely not something that should come up to > often, reporting it because it's different to the thrift mutli_get operation. > Happy to close if it's by design. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira