pub(crate) fn upsert_table_with_row_group(
        &mut self,
        table_name: impl Into<String>,
        row_group: RowGroup,
    ) {
        let table_name = table_name.into();

        // Take write lock to modify chunk.
        let mut chunk_data = self.chunk_data.write();

        // update the meta-data for this chunk with contents of row group.
        chunk_data.rows += row_group.rows() as u64;
        chunk_data.row_groups += 1;

        match chunk_data.data.entry(table_name.clone()) {
            Entry::Occupied(mut table_entry) => {
                let table = table_entry.get_mut();
                table.add_row_group(row_group);
            }
            Entry::Vacant(table_entry) => {
                // add a new table to this chunk.
                table_entry.insert(Table::new(table_name, row_group));
            }
        };

        // Get and set new size of chunk on memory tracker
        let size = Self::base_size() + chunk_data.size();
        self.metrics.memory_bytes.set(size)
    }
/// Add a row_group to a table in the chunk, updating all Chunk meta data.
///
/// This operation locks the chunk for the duration of the call.
///
/// TODO(edd): to be deprecated.
Add a row_group to a table in the chunk, updating all Chunk meta data.
This operation locks the chunk for the duration of the call.

to be deprecated.
Add a row_group to a table in the chunk updating all Chunk meta data . This operation locks the chunk for the duration of the call . to be deprecated .
pub(crate) fn upsert_table_with_row_group(
        &mut self,
        table_name: impl Into<String>,
        row_group: RowGroup,
    ) {
        let table_name = table_name.into();
        // Take write lock to modify chunk.
        let mut chunk_data = self.chunk_data.write();
        // update the meta-data for this chunk with contents of row group.
        chunk_data.rows += row_group.rows() as u64;
        chunk_data.row_groups += 1;
        match chunk_data.data.entry(table_name.clone()) {
            Entry::Occupied(mut table_entry) => {
                let table = table_entry.get_mut();
                table.add_row_group(row_group);
            }
            Entry::Vacant(table_entry) => {
                // add a new table to this chunk.
                table_entry.insert(Table::new(table_name, row_group));
            }
        };
        // Get and set new size of chunk on memory tracker
        let size = Self::base_size() + chunk_data.size();
        self.metrics.memory_bytes.set(size)
    }
pub ( crate ) fn upsert_table_with_row_group ( & mut self , table_name : impl Into < String > , row_group : RowGroup , ) { let table_name = table_name . into ( ) ; // Take write lock to modify chunk. let mut chunk_data = self . chunk_data . write ( ) ; // update the meta-data for this chunk with contents of row group. chunk_data . rows += row_group . rows ( ) as u64 ; chunk_data . row_groups += 1 ; match chunk_data . data . entry ( table_name . clone ( ) ) { Entry :: Occupied ( mut table_entry ) => { let table = table_entry . get_mut ( ) ; table . add_row_group ( row_group ) ; } Entry :: Vacant ( table_entry ) => { // add a new table to this chunk. table_entry . insert ( Table :: new ( table_name , row_group ) ) ; } } ; // Get and set new size of chunk on memory tracker let size = Self :: base_size ( ) + chunk_data . size ( ) ; self . metrics . memory_bytes . set ( size ) }
Add a row_group to a table in the chunk, updating all Chunk meta data.
Add a row_group to a table in the chunk updating all Chunk meta data .
&mut self
table_name
impl Into<String>
row_group
RowGroup
&mut self
table_name
impl Into<String>
row_group
RowGroup