bbotella commented on code in PR #3906: URL: https://github.com/apache/cassandra/pull/3906#discussion_r1958847326
########## src/java/org/apache/cassandra/cql3/statements/schema/AlterTableStatement.java: ########## @@ -751,24 +751,25 @@ public static class AlterConstraints extends AlterTableStatement @Override public KeyspaceMetadata apply(Epoch epoch, KeyspaceMetadata keyspace, TableMetadata table, ClusterMetadata metadata) { - TableMetadata.Builder tableBuilder = table.unbuild().epoch(epoch); - - for (ColumnMetadata column : tableBuilder.columns()) + for (ColumnMetadata column : table.columns()) { if (column.name == columnName) { - constraints.validate(column); - column.setColumnConstraints(constraints); Review Comment: This was using a mutable object and causing problems when detecting metadata differences during alter table executions. By following a similar pattern to the one followed on column masks, we ensure that the changes are detected. -- 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: pr-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org