mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-03 13:37:04 +00:00
cql3: statement_restrictions: replace find_needs_filtering with predicate op check
In the clustering prefix construction loop, replace the find_needs_filtering() call (which walks the merged predicate's expression tree looking for needs-filtering binary operators) with a check on the individual predicate vector. This uses the per-predicate op field directly instead of searching the expression tree.
This commit is contained in:
@@ -1092,7 +1092,8 @@ statement_restrictions::statement_restrictions(private_tag,
|
||||
if (found == sc_ck_preds.end()) {
|
||||
break;
|
||||
}
|
||||
if (find_needs_filtering(found->second.filter)) {
|
||||
const auto& preds = sc_ck_pred_vectors[&col];
|
||||
if (std::ranges::any_of(preds, [](const predicate& p) { return p.op && needs_filtering(*p.op); })) {
|
||||
break;
|
||||
}
|
||||
prefix.push_back(found->second);
|
||||
|
||||
Reference in New Issue
Block a user