From 3db526ffe204cfb80e7dcb4db6b0e87fe3779adb Mon Sep 17 00:00:00 2001 From: Piotr Sarna Date: Tue, 19 Feb 2019 13:15:41 +0100 Subject: [PATCH] cql3: add specified is_satisfied_by to multi-column restriction Multi-column restrictions need only schema, clustering key and query options in order to decide if they are satisfied, so an overloaded function that takes reduced number of parameters is added. --- cql3/restrictions/multi_column_restriction.hh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cql3/restrictions/multi_column_restriction.hh b/cql3/restrictions/multi_column_restriction.hh index 390c1ae43b..9c859a0cb8 100644 --- a/cql3/restrictions/multi_column_restriction.hh +++ b/cql3/restrictions/multi_column_restriction.hh @@ -101,6 +101,10 @@ public: const row& cells, const query_options& options, gc_clock::time_point now) const override { + return is_satisfied_by(schema, ckey, options); + } + + bool is_satisfied_by(const schema& schema, const clustering_key_prefix& ckey, const query_options& options) const { return boost::algorithm::any_of(bounds_ranges(options), [&ckey, &schema] (const bounds_range_type& range) { return range.contains(query::clustering_range(ckey), clustering_key_prefix::prefix_equal_tri_compare(schema)); });