Skip to content

Commit 6c6f967

Browse files
committed
chore(cubestore): Upgrade DF: Avoid needless Arc in DataFrame
1 parent 35f2912 commit 6c6f967

File tree

1 file changed

+2
-19
lines changed
  • rust/cubestore/cubestore/src/store

1 file changed

+2
-19
lines changed

rust/cubestore/cubestore/src/store/mod.rs

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -61,31 +61,14 @@ pub const ROW_GROUP_SIZE: usize = 16384; // TODO config
6161
#[derive(Serialize, Deserialize, Hash, Eq, PartialEq, Debug, DeepSizeOf)]
6262
pub struct DataFrame {
6363
columns: Vec<Column>,
64-
data: Arc<Vec<Row>>,
64+
data: Vec<Row>,
6565
}
6666

6767
impl DataFrame {
6868
pub fn new(columns: Vec<Column>, data: Vec<Row>) -> DataFrame {
6969
DataFrame {
7070
columns,
71-
data: Arc::new(data),
72-
}
73-
}
74-
75-
pub fn lowercase(&self) -> Self {
76-
Self {
77-
columns: self
78-
.columns
79-
.iter()
80-
.map(|c| {
81-
Column::new(
82-
c.get_name().to_lowercase(),
83-
c.get_column_type().clone(),
84-
c.get_index().clone(),
85-
)
86-
})
87-
.collect(),
88-
data: self.data.clone(),
71+
data,
8972
}
9073
}
9174

0 commit comments

Comments
 (0)