git commit: Add ability for CQL3 to list partition keys

2013-08-21 Thread aleksey
Updated Branches:
  refs/heads/cassandra-2.0 bfb06473e - b362aebd3


Add ability for CQL3 to list partition keys

patch by Aleksey Yeschenko and Dan Jatnieks;
reviewed by Sylvain Lebresne for CASSANDRA-4536


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

Branch: refs/heads/cassandra-2.0
Commit: b362aebd304144235121350913839b9a7ba3a5b0
Parents: bfb0647
Author: Aleksey Yeschenko alek...@apache.org
Authored: Wed Aug 21 19:09:58 2013 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Wed Aug 21 19:09:58 2013 +0300

--
 CHANGES.txt |  1 +
 bin/cqlsh   |  4 +-
 doc/cql3/CQL.textile|  9 ++-
 pylib/cqlshlib/cql3handling.py  |  2 +-
 src/java/org/apache/cassandra/cql3/Cql.g|  6 +-
 .../apache/cassandra/cql3/QueryProcessor.java   |  2 +-
 .../cql3/statements/ModificationStatement.java  |  2 +-
 .../cql3/statements/SelectStatement.java| 63 
 8 files changed, 69 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b362aebd/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 8335423..cdc79c1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,6 +6,7 @@
  * Use a range aware scanner for cleanup (CASSANDRA-2524)
  * Cleanup doesn't need to inspect sstables that contain only local data 
(CASSANDRA-5722)
+ * Add ability for CQL3 to list partition keys (CASSANDRA-4536)
 
 
 2.0.0

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b362aebd/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index 0f51c7f..b1764db 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -32,7 +32,7 @@ exit 1
 from __future__ import with_statement
 
 description = CQL Shell for Apache Cassandra
-version = 4.0.0
+version = 4.0.1
 
 from StringIO import StringIO
 from itertools import groupby
@@ -132,7 +132,7 @@ if os.path.exists(OLD_HISTORY):
 
 DEFAULT_HOST = 'localhost'
 DEFAULT_PORT = 9160
-DEFAULT_CQLVER = '3.1.0'
+DEFAULT_CQLVER = '3.1.1'
 DEFAULT_TRANSPORT_FACTORY = 'cqlshlib.tfactory.regular_transport_factory'
 
 DEFAULT_TIME_FORMAT = '%Y-%m-%d %H:%M:%S%z'

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b362aebd/doc/cql3/CQL.textile
--
diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile
index c87b9a5..e8f991b 100644
--- a/doc/cql3/CQL.textile
+++ b/doc/cql3/CQL.textile
@@ -1,6 +1,6 @@
 link rel=StyleSheet href=CQL.css type=text/css media=screen
 
-h1. Cassandra Query Language (CQL) v3.1.0
+h1. Cassandra Query Language (CQL) v3.1.1
 
 
  span id=tableOfContents
@@ -604,7 +604,7 @@ bc(syntax)..
   ( LIMIT integer )?
   ( ALLOW FILTERING )?
 
-select-clause ::= selection-list
+select-clause ::= DISTINCT? selection-list
   | COUNT '(' ( '*' | '1' ) ')' (AS identifier)?
 
 selection-list ::= selector (AS identifier)? ( ',' selector (AS 
identifier)? )*
@@ -1077,12 +1077,17 @@ CQL distinguishes between _reserved_ and _non-reserved_ 
keywords. Reserved keywo
 | @WHERE@| yes |
 | @WITH@ | yes |
 | @WRITETIME@| no  |
+| @DISTINCT@ | no  |
 
 
 h2(#changes). Changes
 
 The following describes the addition/changes brought for each version of CQL.
 
+h3. 3.1.1
+
+* @SELECT@ statement now allows listing the partition keys (using the 
@DISTINCT@ modifier). See 
CASSANDRA-4536:https://issues.apache.org/jira/browse/CASSANDRA-4536.
+
 h3. 3.1.0
 
 * ALTER TABLE:#alterTableStmt @DROP@ option has been reenabled for CQL3 
tables and has new semantics now: the space formerly used by dropped columns 
will now be eventually reclaimed (post-compaction). You should not readd 
previously dropped columns unless you use timestamps with microsecond precision 
(see CASSANDRA-3919:https://issues.apache.org/jira/browse/CASSANDRA-3919 for 
more details).

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b362aebd/pylib/cqlshlib/cql3handling.py
--
diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py
index eacc433..0b38d04 100644
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@ -568,7 +568,7 @@ syntax_rules += r'''
  ) (= |  |  | = | =) 
tokenDefinition
  | [rel_lhs]=cident IN ( term ( , term )* )
  ;
-selectClause ::= selector (AS cident)? (, selector (AS 

[1/2] git commit: Add ability for CQL3 to list partition keys

2013-08-21 Thread aleksey
Updated Branches:
  refs/heads/trunk 43105f7f1 - 0da21de3e


Add ability for CQL3 to list partition keys

patch by Aleksey Yeschenko and Dan Jatnieks;
reviewed by Sylvain Lebresne for CASSANDRA-4536


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

Branch: refs/heads/trunk
Commit: b362aebd304144235121350913839b9a7ba3a5b0
Parents: bfb0647
Author: Aleksey Yeschenko alek...@apache.org
Authored: Wed Aug 21 19:09:58 2013 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Wed Aug 21 19:09:58 2013 +0300

--
 CHANGES.txt |  1 +
 bin/cqlsh   |  4 +-
 doc/cql3/CQL.textile|  9 ++-
 pylib/cqlshlib/cql3handling.py  |  2 +-
 src/java/org/apache/cassandra/cql3/Cql.g|  6 +-
 .../apache/cassandra/cql3/QueryProcessor.java   |  2 +-
 .../cql3/statements/ModificationStatement.java  |  2 +-
 .../cql3/statements/SelectStatement.java| 63 
 8 files changed, 69 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b362aebd/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 8335423..cdc79c1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,6 +6,7 @@
  * Use a range aware scanner for cleanup (CASSANDRA-2524)
  * Cleanup doesn't need to inspect sstables that contain only local data 
(CASSANDRA-5722)
+ * Add ability for CQL3 to list partition keys (CASSANDRA-4536)
 
 
 2.0.0

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b362aebd/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index 0f51c7f..b1764db 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -32,7 +32,7 @@ exit 1
 from __future__ import with_statement
 
 description = CQL Shell for Apache Cassandra
-version = 4.0.0
+version = 4.0.1
 
 from StringIO import StringIO
 from itertools import groupby
@@ -132,7 +132,7 @@ if os.path.exists(OLD_HISTORY):
 
 DEFAULT_HOST = 'localhost'
 DEFAULT_PORT = 9160
-DEFAULT_CQLVER = '3.1.0'
+DEFAULT_CQLVER = '3.1.1'
 DEFAULT_TRANSPORT_FACTORY = 'cqlshlib.tfactory.regular_transport_factory'
 
 DEFAULT_TIME_FORMAT = '%Y-%m-%d %H:%M:%S%z'

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b362aebd/doc/cql3/CQL.textile
--
diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile
index c87b9a5..e8f991b 100644
--- a/doc/cql3/CQL.textile
+++ b/doc/cql3/CQL.textile
@@ -1,6 +1,6 @@
 link rel=StyleSheet href=CQL.css type=text/css media=screen
 
-h1. Cassandra Query Language (CQL) v3.1.0
+h1. Cassandra Query Language (CQL) v3.1.1
 
 
  span id=tableOfContents
@@ -604,7 +604,7 @@ bc(syntax)..
   ( LIMIT integer )?
   ( ALLOW FILTERING )?
 
-select-clause ::= selection-list
+select-clause ::= DISTINCT? selection-list
   | COUNT '(' ( '*' | '1' ) ')' (AS identifier)?
 
 selection-list ::= selector (AS identifier)? ( ',' selector (AS 
identifier)? )*
@@ -1077,12 +1077,17 @@ CQL distinguishes between _reserved_ and _non-reserved_ 
keywords. Reserved keywo
 | @WHERE@| yes |
 | @WITH@ | yes |
 | @WRITETIME@| no  |
+| @DISTINCT@ | no  |
 
 
 h2(#changes). Changes
 
 The following describes the addition/changes brought for each version of CQL.
 
+h3. 3.1.1
+
+* @SELECT@ statement now allows listing the partition keys (using the 
@DISTINCT@ modifier). See 
CASSANDRA-4536:https://issues.apache.org/jira/browse/CASSANDRA-4536.
+
 h3. 3.1.0
 
 * ALTER TABLE:#alterTableStmt @DROP@ option has been reenabled for CQL3 
tables and has new semantics now: the space formerly used by dropped columns 
will now be eventually reclaimed (post-compaction). You should not readd 
previously dropped columns unless you use timestamps with microsecond precision 
(see CASSANDRA-3919:https://issues.apache.org/jira/browse/CASSANDRA-3919 for 
more details).

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b362aebd/pylib/cqlshlib/cql3handling.py
--
diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py
index eacc433..0b38d04 100644
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@ -568,7 +568,7 @@ syntax_rules += r'''
  ) (= |  |  | = | =) 
tokenDefinition
  | [rel_lhs]=cident IN ( term ( , term )* )
  ;
-selectClause ::= selector (AS cident)? (, selector (AS 
cident)?)*