You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sylvain Lebresne (JIRA)" <ji...@apache.org> on 2012/04/25 18:02:26 UTC

[jira] [Created] (CASSANDRA-4186) CQL3: make some keywords unreserved

Sylvain Lebresne created CASSANDRA-4186:
-------------------------------------------

             Summary: CQL3: make some keywords unreserved
                 Key: CASSANDRA-4186
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4186
             Project: Cassandra
          Issue Type: Improvement
          Components: API
    Affects Versions: 1.1.0
            Reporter: Sylvain Lebresne
            Assignee: Sylvain Lebresne
            Priority: Minor
             Fix For: 1.1.1


CQL has quite a few keywords. Currently all of them are reserved, but this is not always necessary. PostreSQL for instance distinguish between reserved keywords and non-reserved ones, and allow things like {{key}}, {{timestamp}} or {{type}} as identifiers. I suggest we do the same as convenience for the user.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-4186) CQL3: make some keywords unreserved

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-4186:
--------------------------------------

    Reviewer: xedin
    
> CQL3: make some keywords unreserved
> -----------------------------------
>
>                 Key: CASSANDRA-4186
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4186
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: API
>    Affects Versions: 1.1.0
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>              Labels: cql3
>             Fix For: 1.1.1
>
>         Attachments: 0001-Add-unreserved-words.txt
>
>
> CQL has quite a few keywords. Currently all of them are reserved, but this is not always necessary. PostreSQL for instance distinguish between reserved keywords and non-reserved ones, and allow things like {{key}}, {{timestamp}} or {{type}} as identifiers. I suggest we do the same as convenience for the user.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-4186) CQL3: make some keywords unreserved

Posted by "Pavel Yaskevich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13266879#comment-13266879 ] 

Pavel Yaskevich commented on CASSANDRA-4186:
--------------------------------------------

+1, with one nit - instead of doing c= all the time in native_type rule, you can just move "c" before brackets like : c=(... | ... | ...) { return $c.text; };
                
> CQL3: make some keywords unreserved
> -----------------------------------
>
>                 Key: CASSANDRA-4186
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4186
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: API
>    Affects Versions: 1.1.0
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>              Labels: cql3
>             Fix For: 1.1.1
>
>         Attachments: 0001-Add-unreserved-words.txt
>
>
> CQL has quite a few keywords. Currently all of them are reserved, but this is not always necessary. PostreSQL for instance distinguish between reserved keywords and non-reserved ones, and allow things like {{key}}, {{timestamp}} or {{type}} as identifiers. I suggest we do the same as convenience for the user.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-4186) CQL3: make some keywords unreserved

Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sylvain Lebresne updated CASSANDRA-4186:
----------------------------------------

    Attachment: 0001-Add-unreserved-words.txt

Patch attached to have some keywords not reserved. I'll admit I've use the list of reserved/non-reserver keywords of postgreSQL as inspiration for which to reserve or not, but I'm open to a few changes if someone has good reason for it.

The patch also adds the list of native types directly in the grammar so as to only parse those (or a string for custom ones) and to make them case insensitive. They are not reserved. 
                
> CQL3: make some keywords unreserved
> -----------------------------------
>
>                 Key: CASSANDRA-4186
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4186
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: API
>    Affects Versions: 1.1.0
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>              Labels: cql3
>             Fix For: 1.1.1
>
>         Attachments: 0001-Add-unreserved-words.txt
>
>
> CQL has quite a few keywords. Currently all of them are reserved, but this is not always necessary. PostreSQL for instance distinguish between reserved keywords and non-reserved ones, and allow things like {{key}}, {{timestamp}} or {{type}} as identifiers. I suggest we do the same as convenience for the user.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira