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

Yifan Cai updated CASSANDRA-16398:
----------------------------------
    Test and Documentation Plan: unit test. ci
                         Status: Patch Available  (was: Open)

PR: [https://github.com/apache/cassandra/pull/883]
CI: 
[j11|https://app.circleci.com/pipelines/github/yifan-c/cassandra/183/workflows/eef6f9b0-1d10-4884-96b8-bf4946082654],
 
[j8|https://app.circleci.com/pipelines/github/yifan-c/cassandra/183/workflows/8c6677cc-7967-4b55-9b37-3b81e1de7465]

The patch adds a test to demonstrate the parsing failure and adds 'access' and 
'datacenters' to the unreserved keywords in the parser definition. 

> CQL fails to parse "access" and "datacenters" in DDL statements
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-16398
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16398
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL/Interpreter, CQL/Syntax
>            Reporter: Yifan Cai
>            Assignee: Yifan Cai
>            Priority: Normal
>             Fix For: 4.0-beta5
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The terms, "ACCESS TO ALL DATACENTERS" (for role control,) are introduced in 
> CASSANDRA-13985. 
> They are not marked as unreserved keywords. So in the non-role related DDL 
> statements, for example, create table statement, the parser fails.
>  
> cqlsh> CREATE TABLE test.test_access ( foo text PRIMARY KEY, access text, bar 
> text);
> SyntaxException: line 1:54 mismatched input 'access' expecting ')' (... foo 
> text PRIMARY KEY, [access]...)
>  
> cqlsh> CREATE TABLE test.test_datacenters ( foo text PRIMARY KEY, datacenters 
> text, bar text);
> SyntaxException: line 1:59 mismatched input 'datacenters' expecting ')' (... 
> foo text PRIMARY KEY, [datacenters]...)
>  
> Since ACCESS and DATACENTERS are only applicable to the role defining 
> statements. We should mark them as unreserved keywords in order to allow to 
> use them in the DDL statement. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to