pub fn new(metrics: ChunkMetrics, batch: TableBatch<'_>) -> Result<Self> {
        let table_name = Arc::from(batch.name());

        let mut chunk = Self {
            table_name,
            columns: Default::default(),
            metrics,
            snapshot: Mutex::new(None),
        };

        let columns = batch.columns();
        chunk.write_columns(columns)?;

        Ok(chunk)
    }
/// Create a new batch and write the contents of the [`TableBatch`] into it. Chunks
/// shouldn't exist without some data.
Create a new batch and write the contents of the [`TableBatch`] into it. Chunks
shouldn't exist without some data.
Create a new batch and write the contents of the [ ` TableBatch ` ] into it . Chunks shouldn ' t exist without some data .
pub fn new(metrics: ChunkMetrics, batch: TableBatch<'_>) -> Result<Self> {
        let table_name = Arc::from(batch.name());
        let mut chunk = Self {
            table_name,
            columns: Default::default(),
            metrics,
            snapshot: Mutex::new(None),
        };
        let columns = batch.columns();
        chunk.write_columns(columns)?;
        Ok(chunk)
    }
pub fn new ( metrics : ChunkMetrics , batch : TableBatch < ' _ > ) -> Result < Self > { let table_name = Arc :: from ( batch . name ( ) ) ; let mut chunk = Self { table_name , columns : Default :: default ( ) , metrics , snapshot : Mutex :: new ( None ) , } ; let columns = batch . columns ( ) ; chunk . write_columns ( columns ) ? ; Ok ( chunk ) }
Create a new batch and write the contents of the [`TableBatch`] into it.
Create a new batch and write the contents of the [ ` TableBatch ` ] into it .
metrics
ChunkMetrics
batch
TableBatch<'_>
metrics
ChunkMetrics
batch
TableBatch<'_>