cql3: statement_restrictions: replace has_slice with predicate is_slice check

In the clustering prefix construction loop, replace the has_slice()
call (which uses find_binop to search the merged predicate's expression
tree for slice operators) with a direct check on the individual
predicate vector's is_slice field.
This commit is contained in:
Avi Kivity
2026-05-12 18:59:03 +03:00
parent 4c282f588a
commit e10c124cd3

View File

@@ -1084,7 +1084,7 @@ statement_restrictions::statement_restrictions(private_tag,
break;
}
prefix.push_back(found->second);
if (has_slice(found->second.filter)) {
if (std::ranges::any_of(preds, [](const predicate& p) { return p.is_slice; })) {
break;
}
}