Merge branch 'cassandra-2.0' into cassandra-2.1 Conflicts: CHANGES.txt src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f294ece8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f294ece8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f294ece8 Branch: refs/heads/cassandra-2.1 Commit: f294ece8f1e2afd300be5544886d2ee265d90745 Parents: 7932119 e48e6f3 Author: Tyler Hobbs <ty...@datastax.com> Authored: Thu Aug 28 10:47:39 2014 -0500 Committer: Tyler Hobbs <ty...@datastax.com> Committed: Thu Aug 28 10:47:39 2014 -0500 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../org/apache/cassandra/cql3/statements/ModificationStatement.java | 1 + 2 files changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f294ece8/CHANGES.txt ---------------------------------------------------------------------- diff --cc CHANGES.txt index 6764c30,5b52471..30fcf27 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,62 -1,5 +1,63 @@@ -2.0.11: +2.1.1 + * (cqlsh): Show progress of COPY operations (CASSANDRA-7789) + * Add syntax to remove multiple elements from a map (CASSANDRA-6599) + * Support non-equals conditions in lightweight transactions (CASSANDRA-6839) + * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606) + * (cqlsh) Display the current logged-in user (CASSANDRA-7785) + * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815) + * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE + output (CASSANDRA-7659) + * (cqlsh) Fix handling of CAS statement results (CASSANDRA-7671) + * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405) + * Support list index operations with conditions (CASSANDRA-7499) + * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731) + * Validate IPv6 wildcard addresses properly (CASSANDRA-7680) + * (cqlsh) Error when tracing query (CASSANDRA-7613) + * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569) + * SSTableExport uses correct validator to create string representation of partition + keys (CASSANDRA-7498) + * Avoid NPEs when receiving type changes for an unknown keyspace (CASSANDRA-7689) + * Add support for custom 2i validation (CASSANDRA-7575) + * Pig support for hadoop CqlInputFormat (CASSANDRA-6454) + * Add listen_interface and rpc_interface options (CASSANDRA-7417) + * Improve schema merge performance (CASSANDRA-7444) + * Adjust MT depth based on # of partition validating (CASSANDRA-5263) + * Optimise NativeCell comparisons (CASSANDRA-6755) + * Configurable client timeout for cqlsh (CASSANDRA-7516) + * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111) +Merged from 2.0: + * Better error message when condition is set on PK column (CASSANDRA-7804) + * Don't send schema change responses and events for no-op DDL + statements (CASSANDRA-7600) + * (Hadoop) fix cluster initialisation for a split fetching (CASSANDRA-7774) + * Throw InvalidRequestException when queries contain relations on entire + collection columns (CASSANDRA-7506) + * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) + * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) + * (cqlsh) cqlsh should automatically disable tracing when selecting + from system_traces (CASSANDRA-7641) + * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927) + * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508) + * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703) + * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229) + * Add 'nodetool sethintedhandoffthrottlekb' (CASSANDRA-7635) + * (cqlsh) Add tab-completion for CREATE/DROP USER IF [NOT] EXISTS (CASSANDRA-7611) + * Catch errors when the JVM pulls the rug out from GCInspector (CASSANDRA-5345) + * cqlsh fails when version number parts are not int (CASSANDRA-7524) +Merged from 1.2: + * Improve PasswordAuthenticator default super user setup (CASSANDRA-7788) + + +2.1.0 + * (cqlsh) Fix case insensitivity (CASSANDRA-7834) + * Fix failure to stream ranges when moving (CASSANDRA-7836) + * Correctly remove tmplink files (CASSANDRA-7803) + * (cqlsh) Fix column name formatting for functions, CAS operations, + and UDT field selections (CASSANDRA-7806) + * (cqlsh) Fix COPY FROM handling of null/empty primary key + values (CASSANDRA-7792) + * Fix ordering of static cells (CASSANDRA-7763) +Merged from 2.0: * Forbid re-adding dropped counter columns (CASSANDRA-7831) * Fix CFMetaData#isThriftCompatible() for PK-only tables (CASSANDRA-7832) * Always reject inequality on the partition key without token() http://git-wip-us.apache.org/repos/asf/cassandra/blob/f294ece8/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java index 774883d,b214e76..d1d0c27 --- a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java +++ b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java @@@ -737,19 -804,21 +737,20 @@@ public abstract class ModificationState { for (Pair<ColumnIdentifier, ColumnCondition.Raw> entry : conditions) { - CFDefinition.Name name = cfDef.get(entry.left); - if (name == null) + ColumnDefinition def = metadata.getColumnDefinition(entry.left); + if (def == null) throw new InvalidRequestException(String.format("Unknown identifier %s", entry.left)); - ColumnCondition condition = entry.right.prepare(name); + ColumnCondition condition = entry.right.prepare(keyspace(), def); condition.collectMarkerSpecification(boundNames); - switch (name.kind) + switch (def.kind) { - case KEY_ALIAS: - case COLUMN_ALIAS: + case PARTITION_KEY: + case CLUSTERING_COLUMN: + throw new InvalidRequestException(String.format("PRIMARY KEY part %s found in SET part", entry.left)); + throw new InvalidRequestException(String.format("PRIMARY KEY column '%s' cannot have IF conditions", entry.left)); - case VALUE_ALIAS: - case COLUMN_METADATA: - case STATIC: + default: stmt.addCondition(condition); break; }