Search code examples
cassandracqlnosql

What is difference between CQL for Cassandra 2.x and CQL for Cassandra 1.2


I am new to Cassandra so I have started with current version of CQL(Cassandra 2.x).So I want major difference between CQL for Cassandra 2.x and CQL for Cassandra 1.2.


Solution

  • Based on http://www.datastax.com/documentation/cql/3.1/cql/cql_intro_c.html (and its differences from http://www.datastax.com/documentation/cql/3.0/cql/cql_reference/about_cql_ref_c.html) the main difference(s) are:

    • Lightweight transactions using the IF keyword in INSERT and UPDATE statements.
    • Initial support for triggers.
    • The ALTER TABLE DROP command, which had been removed in the earlier release.
    • Column aliases, similar to aliases in RDBMS SQL, in a SELECT statement.
    • Indexing of any part, partition key or clustering columns, portion of a compound primary key.
    • CQL for Cassandra 2.0 deprecated super columns. Cassandra continues to support apps that query super columns, translating super columns on the fly into CQL constructs and results.
    • The ASSUME command has been removed.
    • The COPY command supports collections.
    • New CQL table attributes: default_time_to_live, memtable_flush_period_in_ms, populate_io_cache_on_flush, speculative_retry