[ 
https://issues.apache.org/jira/browse/CASSANDRA-14359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16428330#comment-16428330
 ] 

Andrés de la Peña commented on CASSANDRA-14359:
-----------------------------------------------

{{DEFAULT}} keyword was added by CASSANDRA-11424 and included in 
[{{ReservedKeywords}}|https://github.com/apache/cassandra/blob/cassandra-3.11/src/java/org/apache/cassandra/cql3/ReservedKeywords.java#L89]
 by CASSANDRA-14205.

That keyword and some others are indeed missed in the CQL documentation:
* cassandra-3.0: {{IS}}, {{MATERIALIZED}}, {{VIEW}}
* cassandra-3.11 and trunk: {{IS}}, {{CAST}}, {{DEFAULT}}, {{DURATION}}, 
{{GROUP}}, {{LIKE}}, {{MATERIALIZED}}, {{MBEAN}}, {{MBEANS}}, {{PER}}, 
{{PARTITION}}, {{UNSET}}, {{VIEW}}

This patch adds them to the {{CQL.textile}}:
||[3.0|https://github.com/apache/cassandra/compare/cassandra-3.0...adelapena:14359-3.0]||[3.11|https://github.com/apache/cassandra/compare/cassandra-3.11...adelapena:14359-3.11]||[trunk|https://github.com/apache/cassandra/compare/trunk...adelapena:14359-trunk]||

> CREATE TABLE fails if there is a column called "default" with Cassandra 3.11.2
> ------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-14359
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14359
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL
>         Environment: This is using Cassandra 3.11.2. This syntax was accepted 
> in 2.1.20.
>            Reporter: Andy Klages
>            Assignee: Andrés de la Peña
>            Priority: Minor
>
> My project is upgrading from Cassandra 2.1 to 3.11. We have a table whose 
> column name is "default". The Cassandra 3.11.2 is rejecting it. I don't see 
> "default" as a keyword in the CQL spec. 
> To reproduce, try adding the following:
> {code:java}
> CREATE TABLE simple (
>     simplekey text PRIMARY KEY,
>     default text // THIS IS REJECTED
> );
> {code}
> I get this error:
> {code:java}
> SyntaxException: line 3:4 mismatched input 'default' expecting ')' (...    
> simplekey text PRIMARY KEY,    [default]...)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to