smiklosovic commented on code in PR #3562:
URL: https://github.com/apache/cassandra/pull/3562#discussion_r1916353363
##########
src/java/org/apache/cassandra/schema/ColumnMetadata.java:
##########
@@ -299,6 +348,24 @@ public ColumnMask getMask()
return mask;
}
+ @Nonnull
+ public ColumnConstraints getColumnConstraints()
+ {
+ return columnConstraints;
+ }
+
+ @Nonnull
+ public void setColumnConstraints(ColumnConstraints constraints)
+ {
+ this.columnConstraints = constraints;
+ }
+
+ @Nullable
+ public void removeColumnConstraints()
+ {
+ columnConstraints = new ColumnConstraints.Noop();
Review Comment:
`new ColumnConstraints.Noop()` can be a singleton. You do not need to create
new instances of this every time you are going to deal with this.
##########
src/java/org/apache/cassandra/schema/ColumnMetadata.java:
##########
@@ -299,6 +348,24 @@ public ColumnMask getMask()
return mask;
}
+ @Nonnull
+ public ColumnConstraints getColumnConstraints()
+ {
+ return columnConstraints;
+ }
+
+ @Nonnull
+ public void setColumnConstraints(ColumnConstraints constraints)
+ {
+ this.columnConstraints = constraints;
+ }
+
+ @Nullable
+ public void removeColumnConstraints()
+ {
+ columnConstraints = new ColumnConstraints.Noop();
Review Comment:
@bbotella `new ColumnConstraints.Noop()` can be a singleton. You do not
need to create new instances of this every time you are going to deal with
this.
--
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]