cnosdb icon indicating copy to clipboard operation
cnosdb copied to clipboard

columns_index don't save in meta

Open bartliu827 opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe.

pub struct TskvTableSchema {
    pub tenant: String,
    pub db: String,
    pub name: String,
    pub schema_version: SchemaVersion,
    next_column_id: ColumnId,

    columns: Vec<TableColumn>,
    //ColumnName -> ColumnsIndex
    columns_index: HashMap<String, usize>,
}

Columns_index can be built from columns, so it does not need to be stored in meta

bartliu827 avatar Sep 04 '24 01:09 bartliu827

columns_index and columns are redundant; The original design was intended for fast indexing; Confirm if it is necessary.

bartliu827 avatar Sep 04 '24 01:09 bartliu827

Columns_index is not necessary to store in meta.

roseboy-liu avatar Sep 04 '24 02:09 roseboy-liu