smiklosovic commented on code in PR #3562:
URL: https://github.com/apache/cassandra/pull/3562#discussion_r1916839065
##########
src/java/org/apache/cassandra/cql3/statements/UpdateStatement.java:
##########
@@ -348,4 +366,34 @@ public AuditLogContext getAuditLogContext()
{
return new AuditLogContext(AuditLogEntryType.UPDATE, keyspace(),
table());
}
+
+ public static void evaluateConstraintsForRow(Row row)
+ {
+ Iterator<Cell<?>> cellIt = row.cells().iterator();
Review Comment:
@bbotella I can imagine that TableMetadata would hold list for columns which
have some constraints. Then we would do `row.getCell(columnWithConstraint)`. If
it does not return null, then we get `cellData` and call `evaluateConstraint`.
If we have a table with 50 columns and we have constraint just on one
column, what we do now is that we will iterate over all 50 columns just to
check one constraint.
Why not to have a list of columns (`ColumnMetadata`) which have constraints
and check only these? In 50/1 scenario, you will just check one cell, not 50.
--
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]