Repository: cassandra
Updated Branches:
  refs/heads/trunk f7cb008ce -> f6ef8ef4d


Ninja: fix cqlsh grammar for functions

Follow up for CASSANDRA-7740


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

Branch: refs/heads/trunk
Commit: f6ef8ef4d91e36c0e0b6ea6f74d0de48a695320d
Parents: f7cb008
Author: Tyler Hobbs <ty...@datastax.com>
Authored: Thu Aug 21 11:43:25 2014 -0500
Committer: Tyler Hobbs <ty...@datastax.com>
Committed: Thu Aug 21 11:43:25 2014 -0500

----------------------------------------------------------------------
 pylib/cqlshlib/cql3handling.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f6ef8ef4/pylib/cqlshlib/cql3handling.py
----------------------------------------------------------------------
diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py
index 38aa8d8..9fb3298 100644
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@ -210,7 +210,7 @@ JUNK ::= /([ 
\t\r\f\v]+|(--|[/][/])[^\n\r]*([\n\r]|$)|[/][*].*?[*][/])/ ;
 <mapLiteral> ::= "{" <term> ":" <term> ( "," <term> ":" <term> )* "}"
                ;
 
-<functionName> ::= ( <identifier> ":" ":" )? <identifier>
+<functionName> ::= <identifier> ( ":" ":" <identifier> )?
                  ;
 
 <statementBody> ::= <useStatement>
@@ -237,6 +237,7 @@ JUNK ::= /([ 
\t\r\f\v]+|(--|[/][/])[^\n\r]*([\n\r]|$)|[/][*].*?[*][/])/ ;
                           | <dropColumnFamilyStatement>
                           | <dropIndexStatement>
                           | <dropUserTypeStatement>
+                          | <dropFunctionStatement>
                           | <alterTableStatement>
                           | <alterKeyspaceStatement>
                           | <alterUserTypeStatement>
@@ -986,7 +987,7 @@ syntax_rules += r'''
 <createFunctionStatement> ::= "CREATE" ("OR" "REPLACE")? "FUNCTION"
                             ("IF" "NOT" "EXISTS")?
                             ("NON"? "DETERMINISTIC")?
-                            ( namespace=<nonSystemKeyspaceName> dot="::" )? 
function=<cfOrKsName>
+                            <functionName>
                             ( "(" ( newcol=<cident> <storageType>
                               ( "," [newcolname]=<cident> <storageType> )* )?
                             ")" )?
@@ -1030,11 +1031,10 @@ syntax_rules += r'''
                        ;
 
 <dropUserTypeStatement> ::= "DROP" "TYPE" ut=<userTypeName>
-                              ;
+                          ;
 
-<dropFunctionStatement> ::= "DROP" "FUNCTION" ("IF" "EXISTS")?
-                              ( namespace=<nonSystemKeyspaceName> dot="." )? 
function=<cfOrKsName>
-                              ;
+<dropFunctionStatement> ::= "DROP" "FUNCTION" ( "IF" "EXISTS" )? <functionName>
+                          ;
 
 '''
 

Reply via email to