jmckenzie-dev commented on code in PR #3562:
URL: https://github.com/apache/cassandra/pull/3562#discussion_r1920456627
##########
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:
Yeah, makes sense. Not a blocker and matrixing of multiple things that have
this optionality lead directly into builder and constructor chaining hell. I
don't think this area is bad enough to warrant any of that so we can just go
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]