Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-16398

Add access and datacenters to unreserved keywords

    XMLWordPrintableJSON

Details

    Description

      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. 

      Attachments

        Issue Links

          Activity

            People

              yifanc Yifan Cai
              yifanc Yifan Cai
              Yifan Cai
              Benjamin Lerer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m