cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-4776) Inconsistent use of quotes for CQL 3 reserved words
Date Mon, 08 Oct 2012 16:08:03 GMT


Sylvain Lebresne commented on CASSANDRA-4776:

In fact there is a documentation bug as the doc pretends that <identifier> are valid
<term> but they are not (a <term> is a value, an <identifier> is not a value,
not in CQL at least). So that should be fixed. So, with the documentation fixed, it should
be clear that you should use single quotes because that's a string you should pass.

That being said, I'm also open at making true/false being values themselves (without quoting).
> Inconsistent use of quotes for CQL 3 reserved words
> ---------------------------------------------------
>                 Key: CASSANDRA-4776
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.1.5
>         Environment: Mac OS X, Fedora 16
>            Reporter: John Sanda
>            Assignee: Aleksey Yeschenko
>            Priority: Minor
> The docs at describe using
double quotes for an identifier that is a reserved word. The following works as expected,
> cqlsh:test> select "columnfamily" from system.schema_columnfamilies;
> I have a table with a boolean column. In order to insert a boolean value, I have to enclose
it in single quotes. The table looks like,
> CREATE TABLE bool_test (
>   id int PRIMARY KEY,
>   val boolean
> );
> Here is what happens when I try using double quotes,
> cqlsh:rhq> insert into bool_test (id, val) values (4, "false");
> Bad Request: line 1:43 no viable alternative at input 'false'
> The use of single quotes here seems inconsistent with what is described in the docs,
and makes things a bit confusing. It would be nice if single or double quotes could be used
for identifiers that are reserved words. I also think it is a bit counter-intuitive to require
quotes for true and false which are literal values.

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:

View raw message