/// Retrieve the next row group writer. May trigger creation of a new file if limit of the
/// previous one is reached.
///
/// # Parameters
///
/// * `num_batch`: Zero based num batch index
Retrieve the next row group writer. May trigger creation of a new file if limit of the
previous one is reached.
Retrieve the next row group writer . May trigger creation of a new file if limit of the previous one is reached .
pub fn next_row_group(&mut self, num_batch: u32) -> Result<Box<dyn RowGroupWriter>, Error> {
        // Check if we need to write the next batch into a new file
        if num_batch != 0 && self.batches_per_file != 0 && num_batch % self.batches_per_file == 0 {
            self.writer.close()?;
            let suffix = format!("_{}", (num_batch / self.batches_per_file) + 1);
            let path = Self::path_with_suffix(self.path, &suffix)?;
            let file = File::create(path)?;
            self.writer =
                SerializedFileWriter::new(file, self.schema.clone(), self.properties.clone())?;
        }
        Ok(self.writer.next_row_group()?)
    }
pub fn next_row_group ( & mut self , num_batch : u32 ) -> Result < Box < dyn RowGroupWriter > , Error > { // Check if we need to write the next batch into a new file if num_batch != 0 && self . batches_per_file != 0 && num_batch % self . batches_per_file == 0 { self . writer . close ( ) ? ; let suffix = format ! ( " " ( num_batch self batches_per_file ) 1 ) ; let path = Self :: path_with_suffix ( self . path , & suffix ) ? ; let file = File :: create ( path ) ? ; self . writer = SerializedFileWriter :: new ( file , self . schema . clone ( ) , self . properties . clone ( ) ) ? ; } Ok ( self . writer . next_row_group ( ) ? ) }
Retrieve the next row group writer.
Retrieve the next row group writer .
&mut self
num_batch
u32