smiklosovic commented on code in PR #3562:
URL: https://github.com/apache/cassandra/pull/3562#discussion_r1912814116
##########
src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java:
##########
@@ -316,6 +320,64 @@ public <V> void validate(V input, ValueAccessor<V>
accessor)
}
}
+ // a int, b text
+ // PARTITION KEY ((a, b), c)
+
+ @Override
+ public void checkConstraints(ByteBuffer input, ColumnConstraints
constraints) throws ConstraintViolationException
+ {
+ boolean allNoopConstraint = true;
+ for (ColumnConstraint c : constraints.getConstraints())
+ {
+ assert c instanceof ColumnConstraints;
+ allNoopConstraint = allNoopConstraint && c instanceof
ColumnConstraints.Noop;
Review Comment:
@bbotella could not this be just simplified to this?
````
for (ColumnConstraint c : constraints.getConstraints())
{
assert c instanceof ColumnConstraints;
if (c instanceof ColumnConstraints.Noop)
return;
}
````
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]