You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jeremiah Jordan (JIRA)" <ji...@apache.org> on 2014/09/06 01:40:28 UTC

[jira] [Commented] (CASSANDRA-7895) ALTER TYPE RENAME TO no longer parses as valid cql

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

Jeremiah Jordan commented on CASSANDRA-7895:
--------------------------------------------

I think this is supposed to be:

{noformat}
alter type foo rename somefield to bar;
{noformat}

At least in the spec it only lets you change a field name.  Not the type name.
https://github.com/apache/cassandra/blob/cassandra-2.1.0/doc/cql3/CQL.textile

{noformat}
<alter-type-stmt> ::= ALTER TYPE <typename> <instruction>

<instruction> ::= ALTER <field-name> TYPE <type>
                | ADD <field-name> <type>
                | RENAME <field-name> TO <field-name> ( AND <field-name> TO <field-name> )*
{noformat}

> ALTER TYPE <name> RENAME TO <name> no longer parses as valid cql
> ----------------------------------------------------------------
>
>                 Key: CASSANDRA-7895
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7895
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Russ Hatch
>
> Type renaming seems to be broken. The error looks like perhaps the syntax has changed or there's a problem parsing the cql.
> {noformat}
> cqlsh:test> create type foo (somefield int);
> cqlsh:test> alter type foo rename to bar;
> <ErrorMessage code=2000 [Syntax error in CQL query] message="line 1:22 no viable alternative at input 'to' (alter type foo rename [to] bar...)">
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)