mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-03 13:37:04 +00:00
cql3: Remove _nonprimary_key_restrictions field
All code that made use of _nonprimary_key_restrictions has been modified to use _new_nonprimary_key_restrictions instead. The field can be removed. Additionally the old code responsible for adding new restrictions can be fully removed, everything is now done using add_restriction. Signed-off-by: Jan Ciolek <jan.ciolek@scylladb.com>
This commit is contained in:
@@ -114,7 +114,6 @@ statement_restrictions::initial_key_restrictions<clustering_key_prefix>::merge_t
|
||||
|
||||
statement_restrictions::statement_restrictions(schema_ptr schema, bool allow_filtering)
|
||||
: _schema(schema)
|
||||
, _nonprimary_key_restrictions(::make_shared<single_column_restrictions>(schema))
|
||||
, _partition_range_is_simple(true)
|
||||
{ }
|
||||
#if 0
|
||||
@@ -418,19 +417,6 @@ statement_restrictions::statement_restrictions(data_dictionary::database db,
|
||||
add_restriction(prepared_restriction, schema, allow_filtering, for_view);
|
||||
|
||||
if (prepared_restriction.op != expr::oper_t::IS_NOT) {
|
||||
const auto restriction = expr::convert_to_restriction(prepared_restriction, schema);
|
||||
if (dynamic_pointer_cast<multi_column_restriction>(restriction)) {
|
||||
} else if (has_token(restriction->expression)) {
|
||||
} else {
|
||||
auto single = restriction;
|
||||
auto& def = *get_the_only_column(single->expression).col;
|
||||
if (def.is_partition_key()) {
|
||||
} else if (def.is_clustering_key()) {
|
||||
} else {
|
||||
_nonprimary_key_restrictions->add_restriction(single);
|
||||
}
|
||||
}
|
||||
|
||||
_where = _where.has_value() ? make_conjunction(std::move(*_where), prepared_restriction) : prepared_restriction;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,8 +57,6 @@ private:
|
||||
/**
|
||||
* Restriction on non-primary key columns (i.e. secondary index restrictions)
|
||||
*/
|
||||
::shared_ptr<single_column_restrictions> _nonprimary_key_restrictions;
|
||||
|
||||
expr::expression _new_nonprimary_key_restrictions;
|
||||
|
||||
expr::single_column_restrictions_map _single_column_nonprimary_key_restrictions;
|
||||
|
||||
Reference in New Issue
Block a user