Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E69AD10980 for ; Sat, 24 Aug 2013 00:27:07 +0000 (UTC) Received: (qmail 6731 invoked by uid 500); 24 Aug 2013 00:27:07 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 6701 invoked by uid 500); 24 Aug 2013 00:27:07 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 6693 invoked by uid 99); 24 Aug 2013 00:27:07 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Aug 2013 00:27:07 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 2DF9C8C4537; Sat, 24 Aug 2013 00:27:07 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aleksey@apache.org To: commits@cassandra.apache.org Date: Sat, 24 Aug 2013 00:27:07 -0000 Message-Id: <7a498b5e1dd54c1784c19ae8d583423e@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] git commit: Correct minor CQL3 grammar rules (USING) Updated Branches: refs/heads/cassandra-2.0.0 b0280cb92 -> 9a42e28d9 Correct minor CQL3 grammar rules (USING) Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/17186d82 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/17186d82 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/17186d82 Branch: refs/heads/cassandra-2.0.0 Commit: 17186d82549e82daf032c132c9520aa795680a4f Parents: ddb501d Author: Aleksey Yeschenko Authored: Sat Aug 24 03:21:52 2013 +0300 Committer: Aleksey Yeschenko Committed: Sat Aug 24 03:21:52 2013 +0300 ---------------------------------------------------------------------- pylib/cqlshlib/cql3handling.py | 2 +- src/java/org/apache/cassandra/cql3/Cql.g | 16 ++++++---------- 2 files changed, 7 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/17186d82/pylib/cqlshlib/cql3handling.py ---------------------------------------------------------------------- diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py index 82e14d4..c5b449f 100644 --- a/pylib/cqlshlib/cql3handling.py +++ b/pylib/cqlshlib/cql3handling.py @@ -955,7 +955,7 @@ def update_indexbracket_completer(ctxt, cass): syntax_rules += r''' ::= "DELETE" ( ( "," )* )? "FROM" cf= - ( "USING" [delopt]= ( "AND" [delopt]= )* )? + ( "USING" [delopt]= )? "WHERE" ; ::= delcol= ( memberbracket="[" memberselector= "]" )? http://git-wip-us.apache.org/repos/asf/cassandra/blob/17186d82/src/java/org/apache/cassandra/cql3/Cql.g ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/cql3/Cql.g b/src/java/org/apache/cassandra/cql3/Cql.g index 218c541..f59be51 100644 --- a/src/java/org/apache/cassandra/cql3/Cql.g +++ b/src/java/org/apache/cassandra/cql3/Cql.g @@ -290,19 +290,11 @@ insertStatement returns [UpdateStatement expr] ; usingClause[Attributes attrs] - : K_USING usingClauseObjective[attrs] ( K_AND? usingClauseObjective[attrs] )* - ; - -usingClauseDelete[Attributes attrs] - : K_USING usingClauseDeleteObjective[attrs] ( K_AND? usingClauseDeleteObjective[attrs] )* - ; - -usingClauseDeleteObjective[Attributes attrs] - : K_TIMESTAMP ts=INTEGER { attrs.timestamp = Long.valueOf($ts.text); } + : K_USING usingClauseObjective[attrs] ( K_AND usingClauseObjective[attrs] )* ; usingClauseObjective[Attributes attrs] - : usingClauseDeleteObjective[attrs] + : K_TIMESTAMP ts=INTEGER { attrs.timestamp = Long.valueOf($ts.text); } | K_TTL t=INTEGER { attrs.timeToLive = Integer.valueOf($t.text); } ; @@ -357,6 +349,10 @@ deleteOp returns [Operation.RawDeletion op] | c=cident '[' t=term ']' { $op = new Operation.ElementDeletion(c, t); } ; +usingClauseDelete[Attributes attrs] + : K_USING K_TIMESTAMP ts=INTEGER { attrs.timestamp = Long.valueOf($ts.text); } + ; + /** * BEGIN BATCH * UPDATE SET name1 = value1 WHERE KEY = keyname1;