index: mark token column as 'computed' when creating mv
Secondary indexes use a computed token column to preserve proper query ordering. This column is now marked as 'computed'.
This commit is contained in:
@@ -135,7 +135,7 @@ 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);
|
||||
// Additional token column is added to ensure token order on secondary index queries
|
||||
bytes token_column_name = get_available_token_column_name(*schema);
|
||||
builder.with_column(token_column_name, bytes_type, column_kind::clustering_key);
|
||||
builder.with_computed_column(token_column_name, bytes_type, column_kind::clustering_key, std::make_unique<token_column_computation>());
|
||||
for (auto& col : schema->partition_key_columns()) {
|
||||
if (col == *index_target) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user