smiklosovic commented on code in PR #3562:
URL: https://github.com/apache/cassandra/pull/3562#discussion_r1911960797


##########
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:
   as soon as `allNoopConstraint` is `false`, you can `break` this for-loop.



-- 
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]

Reply via email to