cql3: expr: change evaluation_input vector components to take spans

Spans are slightly cleaner, slightly faster (as they avoid an indirection),
and allow for replacing some of the arguments with small_vector:s.

Closes #14313
This commit is contained in:
Avi Kivity
2023-06-20 15:36:11 +03:00
committed by Kamil Braun
parent e1c2de4fb8
commit 32b27d6a08
8 changed files with 38 additions and 38 deletions

View File

@@ -291,9 +291,9 @@ bool partition_key_matches(data_dictionary::database db, const schema& base, con
return cql3::expr::is_satisfied_by(
pk_restrictions,
cql3::expr::evaluation_inputs{
.partition_key = &exploded_pk,
.clustering_key = &exploded_ck,
.static_and_regular_columns = nullptr, // partition key filtering only
.partition_key = exploded_pk,
.clustering_key = exploded_ck,
.static_and_regular_columns = {}, // partition key filtering only
.selection = selection.get(),
.options = &dummy_options,
});
@@ -315,9 +315,9 @@ bool clustering_prefix_matches(data_dictionary::database db, const schema& base,
return cql3::expr::is_satisfied_by(
r,
cql3::expr::evaluation_inputs{
.partition_key = &exploded_pk,
.clustering_key = &exploded_ck,
.static_and_regular_columns = nullptr, // clustering key only filtering here
.partition_key = exploded_pk,
.clustering_key = exploded_ck,
.static_and_regular_columns = {}, // clustering key only filtering here
.selection = selection.get(),
.options = &dummy_options,
});
@@ -394,9 +394,9 @@ public:
return cql3::expr::is_satisfied_by(
r,
cql3::expr::evaluation_inputs{
.partition_key = &_pk,
.clustering_key = &ck,
.static_and_regular_columns = &static_and_regular_columns,
.partition_key = _pk,
.clustering_key = ck,
.static_and_regular_columns = static_and_regular_columns,
.selection = _selection.get(),
.options = &dummy_options,
});