You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Michael Dyrby Jensen (JIRA)" <ji...@apache.org> on 2012/09/19 18:01:08 UTC

[jira] [Comment Edited] (CASSANDRA-4380) CQLSH: describe command doesn't output valid CQL command.

    [ https://issues.apache.org/jira/browse/CASSANDRA-4380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13458777#comment-13458777 ] 

Michael Dyrby Jensen edited comment on CASSANDRA-4380 at 9/20/12 2:59 AM:
--------------------------------------------------------------------------

Using CQL3, how are you now expected to create a column family like:

CREATE TABLE UserProducts
(
  userId uuid PRIMARY KEY
);

Where I would then dynamically add the product ids in the column name for each product, and leaving the column value null for each. The type of the product id is uuid.

When I try to create this column family I am told: No definition found that is not part of the PRIMARY KEY

Any help is greatly appreciated.

It works with CQL2, so is it a bug that CQL3 cannot? 







                
      was (Author: dyrby76):
    Using CQL3, how are you now expected to create a column family like:

CREATE TABLE UserProducts
(
  userId uuid PRIMARY KEY
);

Where I would then dynamically add the product ids in the column name for each product, and leaving the column value null for each. The type of the product id is uuid.

When I try to create this column family I am told: No definition found that is not part of the PRIMARY KEY

Any help is greatly appreciated.









                  
> CQLSH: describe command doesn't output valid CQL command.
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-4380
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4380
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.1.0
>            Reporter: Nick Bailey
>            Assignee: paul cannon
>              Labels: cqlsh
>             Fix For: 1.1.3
>
>
> {noformat}
> cqlsh:test> describe columnfamily stats;
> CREATE TABLE stats (
>   gid blob PRIMARY KEY
> ) WITH
>   comment='' AND
>   comparator='CompositeType(org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.BytesType,org.apache.cassandra.db.marshal.UTF8Type)' AND
>   read_repair_chance=0.100000 AND
>   gc_grace_seconds=864000 AND
>   default_validation=blob AND
>   min_compaction_threshold=4 AND
>   max_compaction_threshold=32 AND
>   replicate_on_write='true' AND
>   compaction_strategy_class='SizeTieredCompactionStrategy' AND
>   compression_parameters:sstable_compression='SnappyCompressor';
> {noformat}
> I can create a cf in cql3 and then use describe cf to get the above output. However trying to run that create statement says that all of the following are invalid options:
> * default_validation
> * min_compaction_threshold
> * max_compaction_threshold
> * comparator

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira