mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-28 10:41:12 +00:00
index: use proper local index target when adding index
With global indexes, target column name is always the same as the string kept in 'options[target]' field. It's not the case for local indexes, and so a proper extracting function is used to get the value.
This commit is contained in:
@@ -91,7 +91,8 @@ void secondary_index_manager::reload() {
|
||||
}
|
||||
|
||||
void secondary_index_manager::add_index(const index_metadata& im) {
|
||||
sstring index_target_name = im.options().at(cql3::statements::index_target::target_option_name);
|
||||
sstring index_target = im.options().at(cql3::statements::index_target::target_option_name);
|
||||
sstring index_target_name = target_parser::get_target_column_name_from_string(index_target);
|
||||
_indices.emplace(im.name(), index{index_target_name, im});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user