Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@
description = ">= in WHERE clause not supported in legacy versions")
public class DeleteIT extends InventoryITBase {

private static CustomCcmRule CCM_RULE =
CustomCcmRule.builder().withCassandraConfiguration("enable_sasi_indexes", "true").build();
private static CustomCcmRule CCM_RULE = CustomCcmRule.builder().build();

private static final SessionRule<CqlSession> SESSION_RULE = SessionRule.builder(CCM_RULE).build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ public abstract class InventoryITBase {
new ProductSale(MP3_DOWNLOAD.getId(), DATE_3, 7, Uuids.startOf(915192000), 0.99, 12);

protected static List<String> createStatements(BaseCcmRule ccmRule) {
return createStatements(ccmRule, false);
}

protected static List<String> createStatements(BaseCcmRule ccmRule, boolean requiresSasiIndex) {
ImmutableList.Builder<String> builder =
ImmutableList.<String>builder()
.add(
Expand All @@ -71,7 +75,7 @@ protected static List<String> createStatements(BaseCcmRule ccmRule) {
"CREATE TABLE product_sale(id uuid, day text, ts uuid, customer_id int, price "
+ "double, count int, PRIMARY KEY ((id, day), customer_id, ts))");

if (supportsSASI(ccmRule) && !isSasiBroken(ccmRule)) {
if (requiresSasiIndex && supportsSASI(ccmRule) && !isSasiBroken(ccmRule)) {
builder.add(
"CREATE CUSTOM INDEX product_description ON product(description) "
+ "USING 'org.apache.cassandra.index.sasi.SASIIndex' "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public static void setup() {

SchemaChangeSynchronizer.withLock(
() -> {
for (String query : createStatements(CCM_RULE)) {
for (String query : createStatements(CCM_RULE, true)) {
session.execute(
SimpleStatement.builder(query)
.setExecutionProfile(SESSION_RULE.slowProfile())
Expand Down