You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2012/10/25 05:24:14 UTC

[jira] [Updated] (CASSANDRA-4776) Don't require quotes for true and false

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

Jonathan Ellis updated CASSANDRA-4776:
--------------------------------------

          Component/s: Core
    Affects Version/s:     (was: 1.1.5)
        Fix Version/s: 1.2.1
               Labels: cql3  (was: )
              Summary: Don't require quotes for true and false  (was: Inconsistent use of quotes for CQL 3 reserved words)
    
> Don't require quotes for true and false
> ---------------------------------------
>
>                 Key: CASSANDRA-4776
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4776
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: Mac OS X, Fedora 16
>            Reporter: John Sanda
>            Assignee: Aleksey Yeschenko
>            Priority: Minor
>              Labels: cql3
>             Fix For: 1.2.1
>
>
> The docs at http://cassandra.apache.org/doc/cql3/CQL.html#identifiers 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: http://www.atlassian.com/software/jira