smiklosovic commented on code in PR #4596:
URL: https://github.com/apache/cassandra/pull/4596#discussion_r3100072875
##########
src/java/org/apache/cassandra/cql3/statements/BatchStatement.java:
##########
@@ -336,6 +337,23 @@ public void validate(ClientState state) throws
InvalidRequestException
statement.validate(state);
}
+ @Override
+ public void validatePrepare(ClientState state)
+ {
+ for (ModificationStatement statement : statements)
+ {
+ try
+ {
+ statement.validatePrepare(state);
+ }
+ // if one of the statement is misprepared and we must fail, stop
the loop
+ catch (GuardrailViolatedException e)
Review Comment:
this is not necessary, no? you want this method to throw
`GuardrailViolatedException`. If `validatePrepare` throws, that break is not
necessary. You escape for loop already and it is propagated up.
--
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]