From e10c124cd38c277ef82c59eaeb05fd902312b9bd Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Tue, 12 May 2026 18:59:03 +0300 Subject: [PATCH] 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. --- cql3/restrictions/statement_restrictions.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cql3/restrictions/statement_restrictions.cc b/cql3/restrictions/statement_restrictions.cc index 398b683176..b1a2e41dfc 100644 --- a/cql3/restrictions/statement_restrictions.cc +++ b/cql3/restrictions/statement_restrictions.cc @@ -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; } }