refactor: produce BatchBuilder from a Batch to modify it again (#5186)

chore: pub some mods
This commit is contained in:
LFC
2024-12-18 10:42:33 +08:00
committed by GitHub
parent c33cf59398
commit 18e8c45384
2 changed files with 13 additions and 1 deletions

View File

@@ -861,6 +861,18 @@ impl BatchBuilder {
}
}
impl From<Batch> for BatchBuilder {
fn from(batch: Batch) -> Self {
Self {
primary_key: batch.primary_key,
timestamps: Some(batch.timestamps),
sequences: Some(batch.sequences),
op_types: Some(batch.op_types),
fields: batch.fields,
}
}
}
/// Async [Batch] reader and iterator wrapper.
///
/// This is the data source for SST writers or internal readers.

View File

@@ -24,7 +24,7 @@ use crate::sst::index::IndexOutput;
use crate::sst::DEFAULT_WRITE_BUFFER_SIZE;
pub(crate) mod file_range;
pub(crate) mod format;
pub mod format;
pub(crate) mod helper;
pub(crate) mod metadata;
mod page_reader;