bbotella commented on code in PR #3562:
URL: https://github.com/apache/cassandra/pull/3562#discussion_r1920314097
##########
src/java/org/apache/cassandra/schema/ColumnMetadata.java:
##########
@@ -126,42 +135,60 @@ private static long comparisonOrder(Kind kind, boolean
isComplex, long position,
public static ColumnMetadata partitionKeyColumn(TableMetadata table,
ByteBuffer name, AbstractType<?> type, int position)
{
- return new ColumnMetadata(table, name, type, position,
Kind.PARTITION_KEY, null);
+ return new ColumnMetadata(table, name, type, position,
Kind.PARTITION_KEY, null, ColumnConstraints.NO_OP);
}
public static ColumnMetadata partitionKeyColumn(String keyspace, String
table, String name, AbstractType<?> type, int position)
{
- return new ColumnMetadata(keyspace, table,
ColumnIdentifier.getInterned(name, true), type, position, Kind.PARTITION_KEY,
null);
+ return new ColumnMetadata(keyspace, table,
ColumnIdentifier.getInterned(name, true), type, position, Kind.PARTITION_KEY,
null, ColumnConstraints.NO_OP);
}
public static ColumnMetadata clusteringColumn(TableMetadata table,
ByteBuffer name, AbstractType<?> type, int position)
{
- return new ColumnMetadata(table, name, type, position,
Kind.CLUSTERING, null);
+ return new ColumnMetadata(table, name, type, position,
Kind.CLUSTERING, null, ColumnConstraints.NO_OP);
}
public static ColumnMetadata clusteringColumn(String keyspace, String
table, String name, AbstractType<?> type, int position)
{
- return new ColumnMetadata(keyspace, table,
ColumnIdentifier.getInterned(name, true), type, position, Kind.CLUSTERING,
null);
+ return new ColumnMetadata(keyspace, table,
ColumnIdentifier.getInterned(name, true), type, position, Kind.CLUSTERING,
null, ColumnConstraints.NO_OP);
}
public static ColumnMetadata regularColumn(TableMetadata table, ByteBuffer
name, AbstractType<?> type)
{
- return new ColumnMetadata(table, name, type, NO_POSITION,
Kind.REGULAR, null);
+ return new ColumnMetadata(table, name, type, NO_POSITION,
Kind.REGULAR, null, ColumnConstraints.NO_OP);
}
public static ColumnMetadata regularColumn(String keyspace, String table,
String name, AbstractType<?> type)
{
- return new ColumnMetadata(keyspace, table,
ColumnIdentifier.getInterned(name, true), type, NO_POSITION, Kind.REGULAR,
null);
+ return new ColumnMetadata(keyspace, table,
ColumnIdentifier.getInterned(name, true), type, NO_POSITION, Kind.REGULAR,
null, ColumnConstraints.NO_OP);
}
public static ColumnMetadata staticColumn(TableMetadata table, ByteBuffer
name, AbstractType<?> type)
{
- return new ColumnMetadata(table, name, type, NO_POSITION, Kind.STATIC,
null);
+ return new ColumnMetadata(table, name, type, NO_POSITION, Kind.STATIC,
null, ColumnConstraints.NO_OP);
}
public static ColumnMetadata staticColumn(String keyspace, String table,
String name, AbstractType<?> type)
{
- return new ColumnMetadata(keyspace, table,
ColumnIdentifier.getInterned(name, true), type, NO_POSITION, Kind.STATIC, null);
+ return new ColumnMetadata(keyspace, table,
ColumnIdentifier.getInterned(name, true), type, NO_POSITION, Kind.STATIC, null,
ColumnConstraints.NO_OP);
+ }
+
+ public ColumnMetadata(TableMetadata table,
Review Comment:
I would have agreed with you, but in this particular case, same patter is
used with other of the params (`mask`). I don't think we can come with
different names for the different dimensions we would have to deal with, so my
take would be to leave it as is for this instance. This is something that
always can be refactored if more parameters keep being added.
--
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]