You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by mi...@apache.org on 2014/09/20 03:24:34 UTC

[2/3] git commit: (cqlsh) Tab completeion for indexes on map keys.

(cqlsh) Tab completeion for indexes on map keys.

patch by Philip Thompson; reviewed by Mikhail Stepura for CASSANDRA-7972


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

Branch: refs/heads/trunk
Commit: 6e5dd2329d61eaea47e857c4660d61acfe2d7ff5
Parents: 7e49ed3
Author: Philip Thompson <pt...@gmail.ccom>
Authored: Fri Sep 19 18:23:58 2014 -0700
Committer: Mikhail Stepura <mi...@apache.org>
Committed: Fri Sep 19 18:23:58 2014 -0700

----------------------------------------------------------------------
 CHANGES.txt                    | 1 +
 pylib/cqlshlib/cql3handling.py | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e5dd232/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 7384829..2f8a95b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.1
+ * (cqlsh) Tab completeion for indexes on map keys (CASSANDRA-7972)
  * (cqlsh) Fix UDT field selection in select clause (CASSANDRA-7891)
  * Fix resource leak in event of corrupt sstable
  * (cqlsh) Add command line option for cqlshrc file path (CASSANDRA-7131)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e5dd232/pylib/cqlshlib/cql3handling.py
----------------------------------------------------------------------
diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py
index 994f358..0b5cc8f 100644
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@ -982,7 +982,7 @@ def create_cf_composite_primary_key_comma_completer(ctxt, cass):
 
 syntax_rules += r'''
 <createIndexStatement> ::= "CREATE" "CUSTOM"? "INDEX" ("IF" "NOT" "EXISTS")? indexname=<identifier>? "ON"
-                               cf=<columnFamilyName> "(" col=<cident> ")"
+                               cf=<columnFamilyName> ( "(" col=<cident> ")" | "(" "KEYS"  "(" col=<cident> ")" ")")
                                ( "USING" <stringLiteral> ( "WITH" "OPTIONS" "=" <mapLiteral> )? )?
                          ;