tonbo-io / tonbo

A portable embedded database using Arrow.
https://tonbo.io
Apache License 2.0
795 stars 46 forks source link

refactor: define `record::runtime::Column` with `ColumnDesc` #238

Open ethe opened 2 days ago

ethe commented 2 days ago

What is the current?

Column define as:

pub struct Column {
    pub datatype: Datatype,
    pub value: Arc<dyn Any + Send + Sync>,
    pub is_nullable: bool,
    pub name: String,
}

and ColumnDesc define as:

pub struct ColumnDesc {
    pub datatype: Datatype,
    pub is_nullable: bool,
    pub name: String,
}

which is redundant

What will it become?

Define Column like:

pub struct Column {
    pub desc: ColumnDesc,
    pub value: Arc<dyn Any + Send + Sync>,
}

should be great.

What are the benefits?

Make definition clearer

Are there any alternatives?

No

Does it have a reference?

I think there might be a lot, I will add it in the future.

linear[bot] commented 2 days ago

TON-94 refactor: define `record::runtime::Column` with `ColumnDesc`