You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sylvain Lebresne (JIRA)" <ji...@apache.org> on 2015/02/18 12:01:11 UTC

[jira] [Resolved] (CASSANDRA-8822) static column does not work

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

Sylvain Lebresne resolved CASSANDRA-8822.
-----------------------------------------
    Resolution: Invalid

There is what I assume is a typo in your example: you're inserting into two different partitions, {{'foo'}} and {{'for'}}, and the result is thus expected. If that example come from a documentation, then it's that documentation that has a typo, and if you point us to said documentation we can have a look at fixing it/pinging the right people to fix it. 

> static column does not work
> ---------------------------
>
>                 Key: CASSANDRA-8822
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8822
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Mateusz Moneta
>
> Static columns does not work in cassandra 2.1.2 and cqlsh 5.0.1 even with example from documentation:
> {noformat}
> CREATE TABLE share.test (k text, s text static, i int, primary key (k, i));
> INSERT INTO share.test (k, i, s) VALUES ('foo', 0, 'bar');
> INSERT INTO share.test (k, i, s) VALUES ('for', 1, 'bao');
> SELECT * FROM share.test;
> {noformat}
> output:
> {noformat}
>  k   | i | s
> -----+---+-----
>  foo | 0 | bar
>  for | 1 | bao
> {noformat}
> same with clustering order:
> {noformat}
> CREATE TABLE share.test (k text, s text static, i int, primary key (k, i)) WITH CLUSTERING ORDER BY (i desc);
> INSERT INTO share.test (k, i, s) VALUES ('foo', 0, 'bar');
> INSERT INTO share.test (k, i, s) VALUES ('for', 1, 'bao');
> SELECT * FROM share.test;
> {noformat}
> output:
> {noformat}
> k   | i | s
> -----+---+-----
>  foo | 0 | bar
>  for | 1 | bao
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)