pub fn write_lp_to_chunk(lp: &str, chunk: &mut MBChunk) -> Result<()> {
        let entry = lp_to_entry(lp);

        for w in entry.partition_writes().unwrap() {
            let table_batches = w.table_batches();
            // ensure they are all to the same table
            let table_names: BTreeSet<String> =
                table_batches.iter().map(|b| b.name().to_string()).collect();

            assert!(
                table_names.len() <= 1,
                "Can only write 0 or one tables to chunk. Found {:?}",
                table_names
            );

            for batch in table_batches {
                chunk.write_table_batch(batch)?;
            }
        }

        Ok(())
    }
/// A helper that will write line protocol string to the passed in Chunk.
/// All data will be under a single partition with a clock value and
/// server id of 1.
A helper that will write line protocol string to the passed in Chunk.
All data will be under a single partition with a clock value and
server id of 1.
A helper that will write line protocol string to the passed in Chunk . All data will be under a single partition with a clock value and server id of 1 .
pub fn write_lp_to_chunk(lp: &str, chunk: &mut MBChunk) -> Result<()> {
        let entry = lp_to_entry(lp);
        for w in entry.partition_writes().unwrap() {
            let table_batches = w.table_batches();
            // ensure they are all to the same table
            let table_names: BTreeSet<String> =
                table_batches.iter().map(|b| b.name().to_string()).collect();
            assert!(
                table_names.len() <= 1,
                "Can only write 0 or one tables to chunk. Found {:?}",
                table_names
            );
            for batch in table_batches {
                chunk.write_table_batch(batch)?;
            }
        }
        Ok(())
    }
pub fn write_lp_to_chunk ( lp : & str , chunk : & mut MBChunk ) -> Result < ( ) > { let entry = lp_to_entry ( lp ) ; for w in entry . partition_writes ( ) . unwrap ( ) { let table_batches = w . table_batches ( ) ; // ensure they are all to the same table let table_names : BTreeSet < String > = table_batches . iter ( ) . map ( | b | b . name ( ) . to_string ( ) ) . collect ( ) ; assert ! ( table_names len ( ) 1 " " table_names ) ; for batch in table_batches { chunk . write_table_batch ( batch ) ? ; } } Ok ( ( ) ) }
A helper that will write line protocol string to the passed in Chunk.
A helper that will write line protocol string to the passed in Chunk .
lp
&str
chunk
&mut MBChunk
lp
&str
chunk
&mut MBChunk