mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-08 22:32:55 +00:00
refactor: produce BatchBuilder from a Batch to modify it again (#5186)
chore: pub some mods
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user