smiklosovic commented on code in PR #3562:
URL: https://github.com/apache/cassandra/pull/3562#discussion_r1916356003
##########
src/java/org/apache/cassandra/schema/ColumnMetadata.java:
##########
@@ -627,11 +712,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);
+ boolean hasConstraints = in.readBoolean();
+ ColumnConstraints constraints;
+ if (hasConstraints)
+ constraints = ColumnConstraints.serializer.deserialize(in,
version.asInt());
+ else
+ constraints = new ColumnConstraints.Noop();
+ 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 (!t.columnConstraints.isEmpty())
Review Comment:
@bbotella `if ColumnMetadata.hasConstraint()`
--
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]