mirror of https://github.com/apache/cassandra
Remove ALTER TABLE DROP until #3919 is resolved
This commit is contained in:
parent
add2d2db67
commit
f8b939ab0d
3
NEWS.txt
3
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
|
||||
--------
|
||||
|
|
|
|||
|
|
@ -324,7 +324,6 @@ bc(syntax)..
|
|||
|
||||
<instruction> ::= ALTER <identifier> TYPE <type>
|
||||
| ADD <identifier> <type>
|
||||
| DROP <identifier>
|
||||
| WITH <option> ( AND <option> )*
|
||||
p.
|
||||
__Sample:__
|
||||
|
|
@ -336,9 +335,6 @@ ALTER lastKnownLocation TYPE uuid;
|
|||
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;
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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); }
|
||||
|
|
|
|||
Loading…
Reference in New Issue