The following describes the changes in each version of CQL.
+
and -
operations on dates (CASSANDRA-11936)currentTimestamp
, currentDate
, currentTime
and currentTimeUUID
functions (CASSANDRA-13132)ALTER TABLE
ALTER
has been removed; a column’s type may not be changed after creation (CASSANDRA-12443).ALTER TYPE
ALTER
has been removed; a field’s type may not be changed after creation (CASSANDRA-12443).GROUP BY
(CASSANDRA-10707).DEFAULT UNSET
option for INSERT JSON
to ignore omitted columns (CASSANDRA-11424).null
as a legal value for TTL on insert and update. It will be treated as equivalent to inserting a 0 (CASSANDRA-12216).default_time_to_live
, then explicitly specifying a TTL of 0 in an INSERT
or
UPDATE
statement 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_live
was applied even though a
TTL had been explicitly set.ALTER TABLE
ADD
and DROP
now allow multiple columns to be added/removed.PER PARTITION LIMIT
option for SELECT
statements (see CASSANDRA-7017.UDTValue
and TupleValue
instances via the
new UDFContext
interface (see CASSANDRA-10818.UPDATE
statements and DELETE
statements, respectively. (CASSANDRA-7423).CAST
functions.DELETE
support for inequality expressions and IN
restrictions on any primary key columns.UPDATE
support for IN
restrictions on any primary key columns.TRUNCATE TABLE X
is now accepted as an alias for TRUNCATE X
.date
, time
, tinyint
and smallint
data types have been added.dateOf
and unixTimestampOf
.CREATE INDEX
now supports indexing collection columns, including indexing the keys of map collections through the
keys()
functionCONTAINS
and CONTAINS KEY
operatorsDROP INDEX
now supports optionally specifying a keyspace.SELECT
statements now support selecting multiple rows in a single partition using an IN
clause on combinations
of clustering columns.IF NOT EXISTS
and IF EXISTS
syntax is now supported by CREATE USER
and DROP USER
statements,
respectively.uuid()
method has been added.DELETE ... IF EXISTS
syntax.CREATE INDEX
now allows specifying options when creating CUSTOM indexes.NaN
and Infinity
has 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.SELECT
statement now allows listing the partition keys (using the DISTINCT
modifier). See CASSANDRA-4536.c IN ?
is now supported in WHERE
clauses. In that case, the value expected for the bind variable
will be a list of whatever type c
is.:name
instead of ?
).ALTER TABLE
DROP
option added.SELECT
statement now supports aliases in select clause. Aliases in WHERE and ORDER BY clauses are not supported.CREATE
statements for KEYSPACE
, TABLE
and INDEX
now supports an IF NOT EXISTS
condition.
Similarly, DROP
statements support a IF EXISTS
condition.INSERT
statements optionally supports a IF NOT EXISTS
condition and UPDATE
supports IF
conditions.SELECT
, UPDATE
, and DELETE
statements now allow empty IN
relations (see CASSANDRA-5626.token
method should always
be used for range queries on the partition key (see WHERE clauses).'2'
as a valid value for an int
column (interpreting it has the equivalent of 2
), or 42
as a valid
blob
value (in which case 42
was 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 section for details
on which constant is allowed for which type.timeuuid
values. 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 timeuuid
: now
, minTimeuuid
, maxTimeuuid
,
dateOf
and unixTimestampOf
.4.2E10
is 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.
version | description |
---|---|
Major | The major version must be bumped when backward incompatible changes are introduced. This should rarely occur. |
Minor | Minor version increments occur when new, but backward compatible, functionality is introduced. |
Patch | The patch version is incremented when bugs are fixed. |