(cqlsh) Removed "ALTER TYPE <name> RENAME TO <name>" from tab-completion

patch by Mikhail Stepura; reviewed by <committer> for CASSANDRA-7895


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1b3afd81
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1b3afd81
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1b3afd81

Branch: refs/heads/trunk
Commit: 1b3afd8173cfe02abc86963c7e371f46f0f0952c
Parents: 838151c
Author: Mikhail Stepura <mish...@apache.org>
Authored: Sat Sep 6 18:45:08 2014 -0700
Committer: Mikhail Stepura <mish...@apache.org>
Committed: Sat Sep 6 18:45:08 2014 -0700

----------------------------------------------------------------------
 CHANGES.txt                    | 2 ++
 pylib/cqlshlib/cql3handling.py | 5 ++---
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1b3afd81/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index ea9a05c..46836bf 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.1.0
+ * (cqlsh) Removed "ALTER TYPE <name> RENAME TO <name>" from tab-completion
+   (CASSANDRA-7895)
  * Fixed IllegalStateException in anticompaction (CASSANDRA-7892)
  * cqlsh: DESCRIBE support for frozen UDTs, tuples (CASSANDRA-7863)
  * Avoid exposing internal classes over JMX (CASSANDRA-7879)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1b3afd81/pylib/cqlshlib/cql3handling.py
----------------------------------------------------------------------
diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py
index 92b3e58..744b9b1 100644
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@ -1055,10 +1055,10 @@ syntax_rules += r'''
 <alterUserTypeStatement> ::= "ALTER" "TYPE" ut=<userTypeName>
                                <alterTypeInstructions>
                              ;
-<alterTypeInstructions> ::= "RENAME" "TO" typename=<cfOrKsName>
-                           | "ALTER" existcol=<cident> "TYPE" <storageType>
+<alterTypeInstructions> ::= "ALTER" existcol=<cident> "TYPE" <storageType>
                            | "ADD" newcol=<cident> <storageType>
                            | "RENAME" existcol=<cident> "TO" newcol=<cident>
+                              ( "AND" existcol=<cident> "TO" newcol=<cident> )*
                            ;
 '''
 
@@ -1075,7 +1075,6 @@ def alter_type_field_completer(ctxt, cass):
     return map(maybe_escape_name, fields)
 
 explain_completion('alterInstructions', 'newcol', '<new_column_name>')
-explain_completion('alterTypeInstructions', 'typename', '<new_type_name>')
 explain_completion('alterTypeInstructions', 'newcol', '<new_field_name>')
 
 

Reply via email to