maedhroz commented on code in PR #4222:
URL: https://github.com/apache/cassandra/pull/4222#discussion_r3012085588
##########
test/harry/main/org/apache/cassandra/harry/model/ASTSingleTableModelTest.java:
##########
@@ -557,6 +563,60 @@ public void deleteRowImpactsSearch()
.build());
}
+ @Test
+ public void testClusteringRangeDelete()
+ {
+ TableMetadata metadata = new
Builder().pk(1).ck(1).statics(0).regular(1).build();
+ ASTSingleTableModel model = new ASTSingleTableModel(metadata);
+
+ for (int i = 0; i < 10; i++)
+ {
+ model.update(Mutation.insert(metadata)
+ .value("pk", 0)
+ .value("ck", i)
+ .value("v", i)
+ .build());
+ }
+
+ model.update(Mutation.delete(metadata)
+ .value("pk", 0)
+ .where("ck", Inequality.GREATER_THAN_EQ, 0)
+ .where("ck", Inequality.LESS_THAN, 7)
+ .build());
+
+ model.validate(rows(row(metadata, 0, 7, 7), row(metadata, 0, 8, 8),
row(metadata,0,9,9)),
+ Select.builder(metadata).value("pk", 0)
+ .where("ck", Inequality.GREATER_THAN_EQ, 0)
+ .where("ck", Inequality.LESS_THAN_EQ, 9).build());
Review Comment:
This `Select` should not include the clustering restriction, because it
would still pass even if the range delete was not applied properly.
--
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]