maedhroz commented on code in PR #3489:
URL: https://github.com/apache/cassandra/pull/3489#discussion_r1737075585
##########
test/distributed/org/apache/cassandra/distributed/test/accord/AccordTestBase.java:
##########
@@ -439,12 +439,14 @@ private static boolean isIdempotent(Cluster cluster,
String cql)
});
}
- private static String wrapInTxn(String statement)
+ protected static String wrapInTxn(String statement)
{
if (!statement.trim().toUpperCase().startsWith("BEGIN TRANSACTION"))
{
statement = statement.trim();
- statement =
Arrays.stream(statement.split("\\n")).collect(Collectors.joining("\n ", "BEGIN
TRANSACTION\n ", "\nCOMMIT TRANSACTION"));
+ statement = Arrays.stream(statement.split("\\n"))
+ .map(line -> line.trim().endsWith(";") ? line :
line + ';')
Review Comment:
I think the historical reason for this is that without it, there was some
ambiguity in the Antlr grammar. That may or may not still be the case...
--
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]