From b3c1ee230b55045b20dffc298ba2e99d7897a465 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Tue, 12 May 2026 19:00:25 +0300 Subject: [PATCH] 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. --- 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 b1a2e41dfc..29ac901c61 100644 --- a/cql3/restrictions/statement_restrictions.cc +++ b/cql3/restrictions/statement_restrictions.cc @@ -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(_partition_range_restrictions); } bool