/// Write the contents of a [`TableBatch`] into this Chunk.
///
/// Panics if the batch specifies a different name for the table in this Chunk
Write the contents of a [`TableBatch`] into this Chunk.
Panics if the batch specifies a different name for the table in this Chunk
Write the contents of a [ ` TableBatch ` ] into this Chunk . Panics if the batch specifies a different name for the table in this Chunk
pub fn write_table_batch(
        &mut self,
        sequencer_id: u32,
        sequence_number: u64,
        batch: TableBatch<'_>,
    ) -> Result<()> {
        let table_name = batch.name();
        assert_eq!(
            table_name,
            self.table_name.as_ref(),
            "can only insert table batch for a single table to chunk"
        );
        let columns = batch.columns();
        self.table
            .write_columns(sequencer_id, sequence_number, columns)
            .context(TableWrite { table_name })?;
        // Invalidate chunk snapshot
        *self
            .snapshot
            .try_lock()
            .expect("concurrent readers/writers to MBChunk") = None;
        self.metrics.memory_bytes.set(self.size());
        Ok(())
    }
pub fn write_table_batch ( & mut self , sequencer_id : u32 , sequence_number : u64 , batch : TableBatch < ' _ > , ) -> Result < ( ) > { let table_name = batch . name ( ) ; assert_eq ! ( table_name self table_name as_ref ( ) " " ) ; let columns = batch . columns ( ) ; self . table . write_columns ( sequencer_id , sequence_number , columns ) . context ( TableWrite { table_name } ) ? ; // Invalidate chunk snapshot * self . snapshot . try_lock ( ) . expect ( " " ) = None ; self . metrics . memory_bytes . set ( self . size ( ) ) ; Ok ( ( ) ) }
Write the contents of a [`TableBatch`] into this Chunk.
Write the contents of a [ ` TableBatch ` ] into this Chunk .
&mut self
sequencer_id
u32
sequence_number
u64
batch
TableBatch<'_>