Blake Visin created CASSANDRA-4405:
--------------------------------------

             Summary: SELECT FIRST [N] * does not return KEY
                 Key: CASSANDRA-4405
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4405
             Project: Cassandra
          Issue Type: Bug
          Components: Drivers
    Affects Versions: 1.1.1
         Environment: CQL version 1.0.10
Cassandra version 1.1.1
cqlsh version 2.2.0

            Reporter: Blake Visin
            Priority: Critical


cqlsh:ovg> CREATE COLUMNFAMILY 'testing_bug' (KEY text PRIMARY KEY);
cqlsh:ovg> UPDATE testing_bug SET 'test_col' = 'test_row' where KEY = '1';
cqlsh:ovg> UPDATE testing_bug SET 'test_col_1' = 'test_row_1' where KEY = '1';
cqlsh:ovg> UPDATE testing_bug SET 'test_col_2' = 'test_row_2' where KEY = '1';
cqlsh:ovg> SELECT * FROM testing_bug WHERE KEY = '1';
 KEY | test_col | test_col_1 | test_col_2
-----+----------+------------+------------
   1 | test_row | test_row_1 | test_row_2

cqlsh:ovg> SELECT FIRST 1 * FROM testing_bug WHERE KEY = '1';
 test_col
----------
 test_row

See that KEY is not returned in the second result.  This becomes a problem when 
combining this with IN as we don't know what the row key is.

cqlsh:ovg> SELECT * FROM testing_bug WHERE KEY IN ('1', '2', '3');
 KEY,1 | test_col,test_row | test_col_1,test_row_1 | test_col_2,test_row_2
 KEY,2
 KEY,3

This may also be another problem:
cqlsh:ovg> SELECT FIRST 1 * FROM testing_bug WHERE KEY IN ('1', '2', '3');
 test_col,test_row
need more than 0 values to unpack



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to