From cee488534696ef29f52dba1075557eb6dcd6f1fe Mon Sep 17 00:00:00 2001 From: Tomasz Grabiec Date: Fri, 20 Mar 2015 18:45:26 +0100 Subject: [PATCH] cql3: Enable use of slice restrictions in a query --- cql3/single_column_relation.hh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/cql3/single_column_relation.hh b/cql3/single_column_relation.hh index 6431f880f8..bd713c1b8f 100644 --- a/cql3/single_column_relation.hh +++ b/cql3/single_column_relation.hh @@ -25,6 +25,7 @@ #pragma once #include +#include #include "core/shared_ptr.hh" #include "to_string.hh" @@ -149,12 +150,9 @@ protected: ::shared_ptr bound_names, statements::bound bound, bool inclusive) override { - throw std::runtime_error("not implemented"); -#if 0 - ColumnDefinition columnDef = toColumnDefinition(schema, entity); - Term term = toTerm(toReceivers(schema, columnDef), value, schema.ksName, bound_names); - return new SingleColumnRestriction.Slice(columnDef, bound, inclusive, term); -#endif + auto&& column_def = to_column_definition(schema, _entity); + auto term = to_term(to_receivers(schema, column_def), _value, schema->ks_name, std::move(bound_names)); + return ::make_shared(column_def, bound, inclusive, std::move(term)); } virtual shared_ptr new_contains_restriction(schema_ptr schema,