jmckenzie-dev commented on code in PR #3562:
URL: https://github.com/apache/cassandra/pull/3562#discussion_r1924348797


##########
src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java:
##########
@@ -316,6 +326,53 @@ public  <V> void validate(V input, ValueAccessor<V> 
accessor)
         }
     }
 
+    @Override
+    public void checkConstraints(ByteBuffer input, ColumnConstraints 
constraints) throws ConstraintViolationException
+    {
+        // no constraints defined for the partition keys
+        if (!constraints.hasRelevantConstraints())
+            return;
+
+        ValueAccessor<ByteBuffer> accessor = ByteBufferAccessor.instance;
+
+        boolean isStatic = readIsStatic(input, accessor);

Review Comment:
   The fact that `readIsStatic` also advances / mutates the buffer as a side 
effect makes me 😢. Not your work on this patch. Half a decade ago no less. :)



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