Cassandra feature support

YugabyteDB supports most standard Cassandra features
This page documents a preview version. v2.23 Preview
Preview includes features under active development and is for development and testing only.
For production, use the latest stable version (v2024.1).

Yugabyte Cloud Query Language (YCQL) has its roots in the Cassandra Query Language (CQL). The following tables highlight the important differences in feature support between YCQL and Cassandra 3.4.2.

Data types

Primitive Types

Category Types
Integers BIGINT, COUNTER, INT, INTEGER, SMALLINT, TINYINT, VARINT
Numbers DECIMAL, DOUBLE, FLOAT
Binary data BLOB
Boolean BOOLEAN
Date/Time DATE, TIME, TIMESTAMP
Collections FROZEN, LIST, MAP, SET
IP Addresses INET
JSON JSONB
String TEXT, VARCHAR
UUID TIMEUUID, UUID
TUPLE

User defined data types

Operation Details
Create new type CREATE TYPE
Delete types DROP TYPE
Alter types

DDL

Keyspaces

Operation Details
Creating keyspace CREATE KEYSPACE
Check before creating keyspace CREATE KEYSPACE IF NOT EXISTS
Modifying keyspace ALTER KEYSPACE - No Op
Check before altering keyspace ALTER KEYSPACE IF EXISTS

Tables

Operation Details
Adding columns ADD COLUMN
Altering tables ALTER TABLE
Removing columns DROP COLUMN
Rename column's name RENAME COLUMN
Check before altering tables ALTER TABLE IF EXISTS

Indexes

Operation Details
Adding indexes CREATE INDEX
Removing indexes DROP INDEX
Partial indexes Partial indexes
Covering indexes Covering indexes
Unique indexes Unique indexes
Adding indexes on Collection Cannot create index on map/list/set/full jsonb/udt and the keys,values,entries of a collection

DML

Select

Operation Details
Select columns SELECT * FROM ...
Conditional select with [NOT] IN clause SELECT ... WHERE key IN ...
Conditional select with IF clause SELECT ... IF ...
Select using CONTAINS [KEY] SELECT * FROM ...
SELECT JSON JSONB is supported as a native type
Select with PER PARTITION LIMIT
Grouping results with GROUP BY

Update

Operation Details
Update columns UPDATE - Only single row updates
Conditional update with [NOT] IN clause Only single row updates
Conditional update with IF clause UPDATE ... IF
Update with USING clause UPDATE ... USING
Conditional Update using CONTAINS [KEY] UPDATE ... WHERE <col> CONTAINS ...

Delete

Operation Details
Delete rows DELETE - Only single row deletes
Conditional delete with IF clause DELETE ... IF
Delete with USING clause DELETE ... USING
Conditional delete with [NOT] IN clause Only single row deletes
Conditional delete using CONTAINS [KEY] DELETE ... WHERE <col> CONTAINS ...

Insert

Operation Details
Adding columns INSERT ... INTO ...
INSERT JSON JSONB is supported as a native type

Transactions

Feature Details
Begin a transaction BEGIN TRANSACTION
End a transaction END TRANSACTION
SQL style transaction start START TRANSACTION
SQL style transaction commit COMMIT

Security

Component Details
Roles Manage users and roles
Permissions Grant privileges
Users Legacy Cassandra feature (CREATE, DROP, ALTER, LIST)
LIST ROLES But can be done using query
LIST PERMISSIONS But can be done using query

Other Features

Component Details
Aggregates AVG, COUNT, MAX, MIN, SUM
Built-in Functions Now, DateOf, CurrentTime, ToTime, UUID ...
Operators Binary, Unary, Null operators
Batch Only programmatically via BatchStatement
Materialized Views
Triggers
User Defined Aggregates(UDA)
User-defined functions(UDF)

Learn more