cql3: Use expression instead of _partition_key_restrictions in the remaining code

There are still some places that use partition_key_restrictions
instead of _new_partition_key_restrictions in statement_restrictions.
Change them to use the new representation

Signed-off-by: Jan Ciolek <jan.ciolek@scylladb.com>
This commit is contained in:
Jan Ciolek
2022-06-28 08:09:50 +02:00
parent 0bb49e423a
commit 1339ff1c79
5 changed files with 24 additions and 24 deletions

View File

@@ -231,7 +231,7 @@ void stats::register_stats() {
}
bool partition_key_matches(const schema& base, const view_info& view, const dht::decorated_key& key) {
const auto r = view.select_statement().get_restrictions()->get_partition_key_restrictions();
const cql3::expr::expression& pk_restrictions = view.select_statement().get_restrictions()->get_partition_key_restrictions();
std::vector<bytes> exploded_pk = key.key().explode();
std::vector<bytes> exploded_ck;
std::vector<const column_definition*> pk_columns;
@@ -245,7 +245,7 @@ bool partition_key_matches(const schema& base, const view_info& view, const dht:
auto dummy_options = cql3::query_options({ });
// FIXME: pass nullptrs for some of theses dummies
return cql3::expr::is_satisfied_by(
r->expression,
pk_restrictions,
cql3::expr::evaluation_inputs{
.partition_key = &exploded_pk,
.clustering_key = &exploded_ck,