cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [3/3] git commit: Remove ALTER TABLE DROP until #3919 is resolved
Date Fri, 16 Nov 2012 11:39:10 GMT
Remove ALTER TABLE DROP until #3919 is resolved


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

Branch: refs/heads/trunk
Commit: f8b939ab0d7949c1ac2425ba59bde4b9b6fbf3a3
Parents: add2d2d
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Fri Nov 16 12:33:16 2012 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Fri Nov 16 12:33:16 2012 +0100

----------------------------------------------------------------------
 NEWS.txt                                 |    3 +++
 doc/cql3/CQL.textile                     |    6 +-----
 src/java/org/apache/cassandra/cql3/Cql.g |    2 +-
 3 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f8b939ab/NEWS.txt
----------------------------------------------------------------------
diff --git a/NEWS.txt b/NEWS.txt
index 24474cc..639e3c9 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -72,6 +72,9 @@ Upgrading
       Also, the consistency level cannot be set in the language anymore, but is
       at the protocol level.
       Please refer to the CQL3 documentation for details.
+    - In CQL3, the DROP behavior from ALTER TABLE has currently been removed
+      (because it was not correctly implemented). We hope to add it back soon
+      (Cassandra 1.2.1 or 1.2.2)
 
 Features
 --------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f8b939ab/doc/cql3/CQL.textile
----------------------------------------------------------------------
diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile
index 514473d..bf2746e 100644
--- a/doc/cql3/CQL.textile
+++ b/doc/cql3/CQL.textile
@@ -324,7 +324,6 @@ bc(syntax)..
 
 <instruction> ::= ALTER <identifier> TYPE <type>
                 | ADD   <identifier> <type>
-                | DROP  <identifier>
                 | WITH  <option> ( AND <option> )*
 p. 
 __Sample:__
@@ -337,9 +336,6 @@ ALTER TABLE addamsFamily
 ADD gravesite varchar;
 
 ALTER TABLE addamsFamily
-DROP gender;
-
-ALTER TABLE addamsFamily
 WITH comment = 'A most excellent and useful column family'
  AND read_repair_chance = 0.2;
 p. 
@@ -348,9 +344,9 @@ The @ALTER@ statement is used to manipulate table definitions. It allows
to add
 The @<tablename>@ is the table name optionally preceded by the keyspace name.  The
@<instruction>@ defines the alteration to perform:
 * @ALTER@: Update the type of a given defined column. Note that the type of the "clustering
keys":#createTablepartitionClustering cannot be modified as it induces the on-disk ordering
of rows. Columns on which a "secondary index":#createIndexStmt is defined have the same restriction.
Other columns are free from those restrictions (no validation of existing data is performed),
but it is usually a bad idea to change the type to a non-compatible one, unless no data have
been inserted for that column yet, as this could confuse CQL drivers/tools.
 * @ADD@: Adds a new column to the table. The @<identifier>@ for the new column must
not conflict with an existing column. Moreover, columns cannot be added to tables defined
with the @COMPACT STORAGE@ option.
-* @DROP@: @TODO@ (pending "#3919":https://issues.apache.org/jira/browse/CASSANDRA-3919)
 * @WITH@: Allows to update the options of the table. The "supported @<option>@":#createTableOptions
(and syntax) are the same as for the @CREATE TABLE@ statement except that @COMPACT STORAGE@
is not supported. Note that setting any @compaction@ sub-options has the effect of erasing
all previous @compaction@ options, so you  need to re-specify all the sub-options if you want
to keep them. The same note applies to the set of @compression@ sub-options.
 
+Dropping a column is no yet supported but is on "the roadmap":https://issues.apache.org/jira/browse/CASSANDRA-3919.
In the meantime, a declared but unused column has no impact on performance nor uses any storage.
 
 h3(#dropTableStmt). DROP TABLE
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f8b939ab/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 bc7fd4d..aaa03d3 100644
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@ -448,7 +448,7 @@ alterTableStatement returns [AlterTableStatement expr]
     : K_ALTER K_COLUMNFAMILY cf=columnFamilyName
           ( K_ALTER id=cident K_TYPE v=comparatorType { type = AlterTableStatement.Type.ALTER;
}
           | K_ADD   id=cident v=comparatorType        { type = AlterTableStatement.Type.ADD;
}
-          | K_DROP  id=cident                         { type = AlterTableStatement.Type.DROP;
}
+          // | K_DROP  id=cident                         { type = AlterTableStatement.Type.DROP;
}
           | K_WITH  properties[props]                 { type = AlterTableStatement.Type.OPTS;
}
           | K_RENAME                                  { type = AlterTableStatement.Type.RENAME;
}
                id1=cident K_TO toId1=cident { renames.put(id1, toId1); }


Mime
View raw message