[
https://issues.apache.org/jira/browse/CASSANDRA-17918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17641010#comment-17641010
]
Bernardo Botella Corbi edited comment on CASSANDRA-17918 at 12/1/22 10:58 PM:
------------------------------------------------------------------------------
Here are the patches for the 3 branches:
||Branch||PR||Circle||
|trunk|[PR|https://github.com/apache/cassandra/pull/1907]|https://app.circleci.com/pipelines/github/bbotella/cassandra?branch=CASSANDRA-17918-trunk|
|4.0|[PR|https://github.com/apache/cassandra/pull/2035]|https://app.circleci.com/pipelines/github/bbotella/cassandra?branch=CASSANDRA-17918-cassandra-4.0|
|4.1|[PR|https://github.com/apache/cassandra/pull/2034]|https://app.circleci.com/pipelines/github/bbotella/cassandra?branch=CASSANDRA-17918-4.1|
was (Author: JIRAUSER285406):
Here are the patches for the 3 branches:
||Branch||PR||
|trunk|[PR|https://github.com/apache/cassandra/pull/1907]|
|4.0|[PR|https://github.com/apache/cassandra/pull/2035]|
|4.1|[PR|https://github.com/apache/cassandra/pull/2034]|
> DESCRIBE output does not quote column names using reserved keywords
> -------------------------------------------------------------------
>
> Key: CASSANDRA-17918
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17918
> Project: Cassandra
> Issue Type: Bug
> Components: Legacy/CQL
> Reporter: Yifan Cai
> Assignee: Bernardo Botella Corbi
> Priority: Normal
> Fix For: 4.0.x, 4.1.x
>
>
> The DESCRIBE output of the column names that using reserved keywords are not
> quoted for UDTs. The following test reproduces. Reading the code, it looks
> like that the such columns names are not quoted in materialized view, UDF and
> user defined aggregation.
> The impact of the bug is that schema described cannot be imported due to the
> usage of reserved keywords as column names.
>
> {code:java}
> @Test
> public void testUsingReservedInCreateType() throws Throwable
> {
> String type = createType(KEYSPACE_PER_TEST, "CREATE TYPE %s
> (\"token\" text, \"desc\" text);");
> assertRowsNet(executeDescribeNet(KEYSPACE_PER_TEST, "DESCRIBE TYPE " + type),
> row(KEYSPACE_PER_TEST, "type", type, "CREATE TYPE " +
> KEYSPACE_PER_TEST + "." + type + " (\n" +
> " \"token\" text,\n" +
> " \"desc\" text\n" +
> ");"));
> } {code}
> +Additional information for newcomers:+
> * Unit tests for DESCRIBE statements are in {{DescribeStatementTest}}
> * The statement implementation is in {{DescribeStatement and fetch the
> create statement from the different schema element using
> SchemaElement.toCqlString}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]