Merge branch 'cassandra-2.1' into trunk

This commit is contained in:
Aleksey Yeschenko 2014-08-27 18:21:02 +03:00
commit 0d0aed85fe
4 changed files with 5 additions and 5 deletions

View File

@ -387,7 +387,7 @@ class CQLHelpTopics(object):
Counter columns can be incremented or decremented by an arbitrary
numeric value though the assignment of an expression that adds or
substracts the value.
subtracts the value.
"""
def help_update_where(self):

View File

@ -92,7 +92,7 @@ public abstract class Operation
* This can be one of:
* - Setting a value: c = v
* - Setting an element of a collection: c[x] = v
* - An addition/substraction to a variable: c = c +/- v (where v can be a collection literal)
* - An addition/subtraction to a variable: c = c +/- v (where v can be a collection literal)
* - An prepend operation: c = v + c
*/
public interface RawUpdate
@ -303,7 +303,7 @@ public abstract class Operation
case SET:
return new Sets.Discarder(receiver, value.prepare(keyspace, receiver));
case MAP:
// The value for a map substraction is actually a set
// The value for a map subtraction is actually a set
ColumnSpecification vr = new ColumnSpecification(receiver.ksName,
receiver.cfName,
receiver.name,

View File

@ -288,7 +288,7 @@ public abstract class Sets
}
}
// Note that this is reused for Map substraction too (we substract a set from a map)
// Note that this is reused for Map subtraction too (we subtract a set from a map)
public static class Discarder extends Operation
{
public Discarder(ColumnDefinition column, Term t)

View File

@ -76,7 +76,7 @@ public class CollectionsTest extends CQLTester
assertInvalid("UPDATE %s SET m = m + ? WHERE k = 0", list("a", "b"));
assertInvalid("UPDATE %s SET m = m - [ 'a', 'b' ] WHERE k = 0");
assertInvalid("UPDATE %s SET m = m + ? WHERE k = 0", set("a", "b"));
// Note that we do allow substracting a set from a map, but not a map from a map
// Note that we do allow subtracting a set from a map, but not a map from a map
// TODO: We should remove this 'if' once #7833 is resolved
if (!usePrepared())
assertInvalid("UPDATE %s SET m = m - ? WHERE k = 0", map("a", "b", "c", "d"));