You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2012/07/06 05:39:34 UTC

[jira] [Resolved] (CASSANDRA-4405) SELECT FIRST [N] * does not return KEY

     [ https://issues.apache.org/jira/browse/CASSANDRA-4405?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis resolved CASSANDRA-4405.
---------------------------------------

    Resolution: Won't Fix
      Assignee:     (was: paul cannon)

Agreed, fixing it would break CQL2 applications that depend on this behavior.  For a cleaner, well-behaved CQL you'll need to move to CQL3.
                
> 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
> Ubuntu 11.04
>            Reporter: Blake Visin
>              Labels: cql, cqlsh
>
> 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