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


##########
src/java/org/apache/cassandra/schema/ColumnMetadata.java:
##########
@@ -627,11 +716,24 @@ public ColumnMetadata deserialize(DataInputPlus in, Types 
types, UserFunctions f
             boolean masked = in.readBoolean();
             if (masked)
                 mask = ColumnMask.serializer.deserialize(in, ksName, type, 
types, functions, version);
-            return new ColumnMetadata(ksName, tableName, new 
ColumnIdentifier(nameBB, name), type, position, kind, mask);
+            ColumnConstraints constraints;
+            if (version.isAtLeast(Version.V6) && in.readBoolean())
+                constraints = ColumnConstraints.serializer.deserialize(in, 
version.asInt());
+            else
+                constraints = ColumnConstraints.NO_OP;
+            return new ColumnMetadata(ksName, tableName, new 
ColumnIdentifier(nameBB, name), type, position, kind, mask, constraints);
         }
 
         public long serializedSize(ColumnMetadata t, Version version)
         {
+            long constraintsSize = 0;
+            if (version.isAtLeast(Version.V6))

Review Comment:
   I think @yifan-c already touches on that on this comment
   https://github.com/apache/cassandra/pull/3562#discussion_r1913673066



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