pub fn add_series_data(
        &mut self,
        tagset: Vec<(String, String)>,
        field_key: String,
        mut block: Block,
    ) -> Result<(), TsmError> {
        // Invariant: our data model does not support a field column for a
        // measurement table having multiple data types, even though this is
        // supported in InfluxDB.
        if let Some(fk) = self.field_columns.get(&field_key) {
            if *fk != block.typ {
                warn!(
                    "Rejected block for field {:?} with type {:?}. \
                    Tagset: {:?}, measurement {:?}. \
                    Field exists with type: {:?}",
                    &field_key, block.typ, tagset, self.name, *fk
                );
                return Ok(());
            }
        }

        // tags will be used as the key to a map, where the value will be a
        // collection of all the field keys for that tagset and the associated
        // blocks.
        self.field_columns.insert(field_key.clone(), block.typ);
        for (k, _) in &tagset {
            self.tag_columns.insert(k.clone());
        }

        let field_key_blocks = self.tag_set_fields_blocks.entry(tagset).or_default();
        let blocks = field_key_blocks.entry(field_key).or_default();

        block.reader_idx = self.reader_idx;
        blocks.push(block);

        Ok(())
    }
// updates the table with data from a single TSM index entry's block.
updates the table with data from a single TSM index entry's block.
updates the table with data from a single TSM index entry ' s block .
pub fn add_series_data(
        &mut self,
        tagset: Vec<(String, String)>,
        field_key: String,
        mut block: Block,
    ) -> Result<(), TsmError> {
        // Invariant: our data model does not support a field column for a
        // measurement table having multiple data types, even though this is
        // supported in InfluxDB.
        if let Some(fk) = self.field_columns.get(&field_key) {
            if *fk != block.typ {
                warn!(
                    "Rejected block for field {:?} with type {:?}. \
                    Tagset: {:?}, measurement {:?}. \
                    Field exists with type: {:?}",
                    &field_key, block.typ, tagset, self.name, *fk
                );
                return Ok(());
            }
        }
        // tags will be used as the key to a map, where the value will be a
        // collection of all the field keys for that tagset and the associated
        // blocks.
        self.field_columns.insert(field_key.clone(), block.typ);
        for (k, _) in &tagset {
            self.tag_columns.insert(k.clone());
        }
        let field_key_blocks = self.tag_set_fields_blocks.entry(tagset).or_default();
        let blocks = field_key_blocks.entry(field_key).or_default();
        block.reader_idx = self.reader_idx;
        blocks.push(block);
        Ok(())
    }
pub fn add_series_data ( & mut self , tagset : Vec < ( String , String ) > , field_key : String , mut block : Block , ) -> Result < ( ) , TsmError > { // Invariant: our data model does not support a field column for a // measurement table having multiple data types, even though this is // supported in InfluxDB. if let Some ( fk ) = self . field_columns . get ( & field_key ) { if * fk != block . typ { warn ! ( " \
 \
 " field_key block typ tagset self name fk ) ; return Ok ( ( ) ) ; } } // tags will be used as the key to a map, where the value will be a // collection of all the field keys for that tagset and the associated // blocks. self . field_columns . insert ( field_key . clone ( ) , block . typ ) ; for ( k , _ ) in & tagset { self . tag_columns . insert ( k . clone ( ) ) ; } let field_key_blocks = self . tag_set_fields_blocks . entry ( tagset ) . or_default ( ) ; let blocks = field_key_blocks . entry ( field_key ) . or_default ( ) ; block . reader_idx = self . reader_idx ; blocks . push ( block ) ; Ok ( ( ) ) }
updates the table with data from a single TSM index entry's block.
updates the table with data from a single TSM index entry ' s block .
&mut self
tagset
Vec<(String, String)>
field_key
String
block
Block
&mut self
tagset
Vec<(String, String)>
field_key
String
block
Block