cql3: statement_restrictions: replace has_partition_token with variant check

Replace has_token_restrictions()'s call to has_partition_token() (which
uses find_binop to search the expression tree for token function calls)
with a direct check on the _partition_range_restrictions variant, which
already records whether token restrictions exist.
This commit is contained in:
Avi Kivity
2026-05-12 19:00:25 +03:00
parent e10c124cd3
commit b3c1ee230b

View File

@@ -1294,7 +1294,7 @@ statement_restrictions::clustering_key_restrictions_has_only_eq() const {
bool
statement_restrictions::has_token_restrictions() const {
return has_partition_token(_partition_key_restrictions, *_schema);
return std::holds_alternative<token_range_restrictions>(_partition_range_restrictions);
}
bool