cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Lerer (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-8365) CamelCase name is used as index name instead of lowercase
Date Wed, 17 Dec 2014 08:31:13 GMT


Benjamin Lerer commented on CASSANDRA-8365:

Thanks fo pointing me to CASSANDRA-7314. The code was confusing for me due to the difference
between {{CreateIndexStatement}} and {{DropIndexStatement}} (and my MySQL experience where
an index is associated to a table). I should have looked for the ticket.

> CamelCase name is used as index name instead of lowercase
> ---------------------------------------------------------
>                 Key: CASSANDRA-8365
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Pierre Laporte
>            Assignee: Benjamin Lerer
>            Priority: Minor
>              Labels: cqlsh, docs
>             Fix For: 2.1.3
>         Attachments: CASSANDRA-8365.txt
> In cqlsh, when I execute a CREATE INDEX FooBar ... statement, the CamelCase name is used
as index name, even though it is unquoted. Trying to quote the index name results in a syntax
> However, when I try to delete the index, I have to quote the index name, otherwise I
get an invalid-query error telling me that the index (lowercase) does not exist.
> This seems inconsistent.  Shouldn't the index name be lowercased before the index is
created ?
> Here is the code to reproduce the issue :
> {code}
> cqlsh:schemabuilderit> CREATE TABLE IndexTest (a int primary key, b int);
> cqlsh:schemabuilderit> CREATE INDEX FooBar on indextest (b);
> cqlsh:schemabuilderit> DESCRIBE TABLE indextest ;
> CREATE TABLE schemabuilderit.indextest (
>     a int PRIMARY KEY,
>     b int
> ) ........;
> CREATE INDEX FooBar ON schemabuilderit.indextest (b);
> cqlsh:schemabuilderit> DROP INDEX FooBar;
> code=2200 [Invalid query] message="Index 'foobar' could not be found in any of the tables
of keyspace 'schemabuilderit'"
> {code}

This message was sent by Atlassian JIRA

View raw message