diff --git a/index/secondary_index_manager.cc b/index/secondary_index_manager.cc index 0ab1bd06e6..0029799c8b 100644 --- a/index/secondary_index_manager.cc +++ b/index/secondary_index_manager.cc @@ -110,6 +110,9 @@ view_ptr secondary_index_manager::create_view_for_index(const index_metadata& im } builder.with_column(index_target->name(), index_target->type, column_kind::partition_key); for (auto& col : schema->partition_key_columns()) { + if (col == *index_target) { + continue; + } builder.with_column(col.name(), col.type, column_kind::clustering_key); } for (auto& col : schema->clustering_key_columns()) {