The following describes the changes in each version of CQL.
Add support for IF EXISTS and IF NOT EXISTS in ALTER statements (
Allow GRANT/REVOKE multiple permissions in a single statement (
Pre hashed passwords in CQL (
Add support for type casting in WHERE clause components and in the values of INSERT/UPDATE statements (
Add support for CONTAINS and CONTAINS KEY in conditional UPDATE and DELETE statement (
Allow to grant permission for all tables in a keyspace (
Allow to aggregate by time intervals (
Adds support for arithmetic operators (
Adds support for
-operations on dates (
ALTERhas been removed; a column’s type may not be changed after creation (
ALTERhas been removed; a field’s type may not be changed after creation (
Adds a new
data types <data-types>(
DEFAULT UNSEToption for
INSERT JSONto ignore omitted columns (
nullas a legal value for TTL on insert and update. It will be treated as equivalent to inserting a 0 (
If a table has a non zero
default_time_to_live, then explicitly specifying a TTL of 0 in an
UPDATEstatement will result in the new writes not having any expiration (that is, an explicit TTL of 0 cancels the
default_time_to_live). This wasn’t the case before and the
default_time_to_livewas applied even though a TTL had been explicitly set.
DROPnow allow multiple columns to be added/removed.
PER PARTITION LIMIToption for
SELECTstatements (see CASSANDRA-7017.
User-defined functions <cql-functions>can now instantiate
TupleValueinstances via the new
UDFContextinterface (see CASSANDRA-10818.
User-defined types <udts>may now be stored in a non-frozen form, allowing individual fields to be updated and deleted in
DELETEstatements, respectively. (CASSANDRA-7423).
materialized views <materialized-views>.
DELETEsupport for inequality expressions and
INrestrictions on any primary key columns.
INrestrictions on any primary key columns.
User-defined functions and aggregates <cql-functions>are now supported.
Allows double-dollar enclosed strings literals as an alternative to single-quote enclosed strings.
Introduces Roles to supersede user based authentication and access control
data types <data-types>have been added.
JSON support <cql-json>has been added
Adds new time conversion functions and deprecate
User-defined types <udts>supported.
CREATE INDEXnow supports indexing collection columns, including indexing the keys of map collections through the
Indexes on collections may be queried using the new
Tuple types <tuples>were added to hold fixed-length sets of typed positional fields.
DROP INDEXnow supports optionally specifying a keyspace.
SELECTstatements now support selecting multiple rows in a single partition using an
INclause on combinations of clustering columns.
IF NOT EXISTSand
IF EXISTSsyntax is now supported by
DROP USERstatements, respectively.
It is now possible to group clustering columns in a relation, see
Added support for
static columns <static-columns>.
Infinityhas been added as valid float constants. They are now reserved keywords. In the unlikely case you we using them as a column identifier (or keyspace/table one), you will now need to double quote them.
SELECTstatement now allows listing the partition keys (using the
DISTINCTmodifier). See CASSANDRA-4536.
c IN ?is now supported in
WHEREclauses. In that case, the value expected for the bind variable will be a list of whatever type
It is now possible to use named bind variables (using
SELECTstatement now supports aliases in select clause. Aliases in WHERE and ORDER BY clauses are not supported.
INDEXnow supports an
IF NOT EXISTScondition. Similarly,
DROPstatements support a
INSERTstatements optionally supports a
IF NOT EXISTScondition and
DELETEstatements now allow empty
INrelations (see CASSANDRA-5626.
Updated the syntax for custom
secondary indexes <secondary-indexes>.
Non-equal condition on the partition key are now never supported, even for ordering partitioner as this was not correct (the order was not the one of the type of the partition key). Instead, the
tokenmethod should always be used for range queries on the partition key (see
WHERE clauses <where-clause>).
Type validation for the
constants <constants>has been fixed. For instance, the implementation used to allow
'2'as a valid value for an
intcolumn (interpreting it has the equivalent of
42as a valid
blobvalue (in which case
42was interpreted as an hexadecimal representation of the blob). This is no longer the case, type validation of constants is now more strict. See the
data types <data-types>section for details on which constant is allowed for which type.
The type validation fixed of the previous point has lead to the introduction of blobs constants to allow the input of blobs. Do note that while the input of blobs as strings constant is still supported by this version (to allow smoother transition to blob constant), it is now deprecated and will be removed by a future version. If you were using strings as blobs, you should thus update your client code ASAP to switch blob constants.
A number of functions to convert native types to blobs have also been introduced. Furthermore the token function is now also allowed in select clauses. See the
section on functions <cql-functions>for details.
Date strings (and timestamps) are no longer accepted as valid
timeuuidvalues. Doing so was a bug in the sense that date string are not valid
timeuuid, and it was thus resulting in confusing behaviors. However, the following new methods have been added to help working with
Float constants now support the exponent notation. In other words,
4.2E10is now a valid floating point value.
Versioning of the CQL language adheres to the Semantic Versioning guidelines. Versions take the form X.Y.Z where X, Y, and Z are integer values representing major, minor, and patch level respectively. There is no correlation between Cassandra release versions and the CQL language version.
The major version must be bumped when backward incompatible changes are introduced. This should rarely occur.
Minor version increments occur when new, but backward compatible, functionality is introduced.
The patch version is incremented when bugs are fixed.