Skip to content

Commit

Permalink
feat: make it compile
Browse files Browse the repository at this point in the history
  • Loading branch information
evenyag committed Aug 14, 2023
1 parent 013f01f commit 84867de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/mito2/src/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl Batch {
fields: Vec<BatchColumn>,
) -> Result<Batch> {
BatchBuilder::new(primary_key, timestamps, sequences, op_types)
.fields(fields)
.with_fields(fields)
.build()
}

Expand Down Expand Up @@ -124,7 +124,7 @@ impl BatchBuilder {
}

/// Set all field columns.
pub fn fields(&mut self, fields: Vec<BatchColumn>) -> &mut Self {
pub fn with_fields(mut self, fields: Vec<BatchColumn>) -> Self {
self.fields = fields;
self
}
Expand Down
4 changes: 2 additions & 2 deletions src/mito2/src/sst/parquet/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ impl<'a> ParquetWriter<'a> {
let arrow_batch = RecordBatch::try_new(
arrow_schema.clone(),
batch
.columns
.fields()
.iter()
.map(|v| v.to_arrow_array())
.map(|v| v.data.to_arrow_array())
.collect::<Vec<_>>(),
)
.context(NewRecordBatchSnafu)?;
Expand Down

0 comments on commit 84867de

Please sign in to comment.