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

Eric Evans updated CASSANDRA-1005:
----------------------------------

    Attachment: 0001-support-all-legal-keyspace-and-column-names-in-cli.patch
                cli.sh

The attached patch seems to do it.

Also attached is the cassandra-cli script I used to test. To run it, first 
create keyspaces named {{1Space}} and {{0000}}, with column families named 
{{2Family}} and {{1111}} respectively, then run:

{noformat}
$ cassandra-cli < cli.sh
{noformat}

> cassandra-cli doesn't work with system allowed column family names
> ------------------------------------------------------------------
>
>                 Key: CASSANDRA-1005
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1005
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: Windows XP 32 bit
>            Reporter: James Mello
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 0.6.2
>
>         Attachments: 
> 0001-support-all-legal-keyspace-and-column-names-in-cli.patch, cli.sh
>
>
> Given the following definitions for columns:
> <Keyspaces>
> <Keyspace Name="NGram">
> <KeysCachedFraction>0.01</KeysCachedFraction>
> <ColumnFamily CompareWith="UTF8Type" Name="1GramR"/>
> <ColumnFamily CompareWith="UTF8Type" Name="1GramL"/>
> </Keyspaces>
> The appropriate keyspaces are created an persisteted on startup. When 
> executing a query or a set operation in the cassandra-cli, you end up with 
> the following error:
> ******************************************************
> cassandra> get NGram.1GramR['hte']
> line 1:10 extraneous input '1' expecting Identifier
> No such column family: GramR
> ******************************************************
> Following the syntax of the grammer we can see the following:
> setStmt
> : K_SET columnFamilyExpr '=' value -> ^(NODE_THRIFT_SET columnFamilyExpr 
> value)
> ;
> ...
> columnFamilyExpr
> : table DOT columnFamily '[' rowKey ']'
> ( '[' a+=columnOrSuperColumn ']'
> ('[' a+=columnOrSuperColumn ']')?
> )?
> -> ^(NODE_COLUMN_ACCESS table columnFamily rowKey ($a+)?)
> ;
> ...
> // syntactic Elements
> Identifier
> : Letter ( Alnum | '_' )*
> ;
> There is a mismatch on what is appropriate values for this in the system. So 
> either the restriction needs to be lifted in the cli, or the system must have 
> a way of honoring the names.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to