[
https://issues.apache.org/jira/browse/CASSANDRA-15663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17377323#comment-17377323
]
Andres de la Peña edited comment on CASSANDRA-15663 at 7/8/21, 11:22 AM:
-------------------------------------------------------------------------
{quote}Should we port this also to 4.0.0 before the release(with the updated
list of words of course)?
{quote}
I'm a bit on the fence about porting to 4.0.0, since it's always scary to risk
compromising the stability of the release with a bug that doesn't seem that
bad. However it's clearly a bug, the solution seems quite straight forward and
I like the idea of fixing the list of keywords since the start of a major, so
we don't have changes in between minors. So I think I'd port this to 4.0.0.
wdyt?
Also, I think that the patch only needs to override
{{metadata.cql_keywords_reserved}}. IIUC {{metada.cql_keywords}} and
{{metadata.cql_keywords_unreserved}} only exist to generate
{{metadata.cql_keywords_reserved}}, and they aren't used anywhere else. I think
that the reason why it's done that way in the driver is because in pre-3.0
releases there wasn't an explicit set of reserved keywords in the server. The
Java class {{ReservedKeywords}} didn't exist back then, and all the grammar was
in the
[{{Cql.g}}|https://github.com/apache/cassandra/blob/cassandra-2.2/src/java/org/apache/cassandra/cql3/Cql.g]
file. That file contained the sets of keywords and unreserved keywords that
were used to calculate the set of reserved keywords. So, now that we have a
clear list of reserved keywords on the server, we can just use it to override
{{metadata.cql_keywords_reserved}} and ignore the other sets.
was (Author: adelapena):
{quote}Should we port this also to 4.0.0 before the release(with the updated
list of words of course)?
{quote}
I'm a bit on the fence about porting to 4.0.0, since it's always scary to risk
compromising the stability of the release with a bug that doesn't seem that
bad. However it's clearly a bug, the solution seems quite straight forward and
I like the idea of fixing the list of keywords since the start of a major, so
we don't have changes in between minors. So I think I'd port this to 4.0.0.
wdyt?
Also, I think that the patch only needs to override
{{metadata.cql_keywords_reserved}}. IIUC {{metada.cql_keywords}} and
{{metadata.cql_keywords_unreserved}} only exist to generate
{{metadata.cql_keywords_reserved}}. I think that the reason why it's done that
way in the driver is because in pre-3.0 releases there wasn't an explicit set
of reserved keywords in the server. The Java class {{ReservedKeywords}} didn't
exist back then, and all the grammar was in the
[{{Cql.g}}|https://github.com/apache/cassandra/blob/cassandra-2.2/src/java/org/apache/cassandra/cql3/Cql.g]
file. That file contained the sets of keywords and unreserved keywords that
were used to calculate the set of reserved keywords. So, now that we have a
clear list of reserved keywords on the server, we can just use it to override
{{metadata.cql_keywords_reserved}} and ignore the other sets.
> DESCRIBE KEYSPACE does not properly quote table names
> -----------------------------------------------------
>
> Key: CASSANDRA-15663
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15663
> Project: Cassandra
> Issue Type: Bug
> Components: CQL/Syntax
> Reporter: Oskar Liljeblad
> Assignee: Aleksandr Sorokoumov
> Priority: Normal
> Labels: pull-request-available
> Fix For: 3.11.x
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
> How to reproduce (3.11.6) - cqlsh:
> {code}
> CREATE KEYSPACE test1 WITH replication = \{'class': 'SimpleStrategy',
> 'replication_factor': '1'} AND durable_writes = true;
> CREATE TABLE test1."default" (id text PRIMARY KEY, data text, etag text);
> DESCRIBE KEYSPACE test1;
> {code}
> Output will be:
> {code}
> CREATE TABLE test1.default (
> id text PRIMARY KEY,
> data text,
> etag text
> ) WITH [..]
> {code}
> Output should be:
> {code}
> CREATE TABLE test1."default" (
> id text PRIMARY KEY,
> data text,
> etag text
> ) WITH [..]
> {code}
> If you try to run {{CREATE TABLE test1.default [..]}} you will get an error
> SyntaxException: line 1:19 no viable alternative at input 'default' (CREATE
> TABLE test1.[default]...)
> Oskar Liljeblad
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]