pub async fn end(&mut self, key_value_metadata: Option<Vec<KeyValue>>) -> Result<u64> {
        if self.offset == 0 {
            self.start().await?;
        }

        if self.state != State::Started {
            return Err(Error::General("End cannot be called twice".to_string()));
        }
        // compute file stats
        let num_rows = self.row_groups.iter().map(|group| group.num_rows).sum();

        let metadata = FileMetaData::new(
            self.options.version.into(),
            self.schema.clone().into_thrift(),
            num_rows,
            self.row_groups.clone(),
            key_value_metadata,
            self.created_by.clone(),
            None,
            None,
            None,
        );

        let len = end_file(&mut self.writer, metadata).await?;
        Ok(self.offset + len)
    }
/// Writes the footer of the parquet file. Returns the total size of the file and the
/// underlying writer.
Writes the footer of the parquet file. Returns the total size of the file and the
underlying writer.
Writes the footer of the parquet file . Returns the total size of the file and the underlying writer .
pub async fn end(&mut self, key_value_metadata: Option<Vec<KeyValue>>) -> Result<u64> {
        if self.offset == 0 {
            self.start().await?;
        }
        if self.state != State::Started {
            return Err(Error::General("End cannot be called twice".to_string()));
        }
        // compute file stats
        let num_rows = self.row_groups.iter().map(|group| group.num_rows).sum();
        let metadata = FileMetaData::new(
            self.options.version.into(),
            self.schema.clone().into_thrift(),
            num_rows,
            self.row_groups.clone(),
            key_value_metadata,
            self.created_by.clone(),
            None,
            None,
            None,
        );
        let len = end_file(&mut self.writer, metadata).await?;
        Ok(self.offset + len)
    }
pub async fn end ( & mut self , key_value_metadata : Option < Vec < KeyValue > > ) -> Result < u64 > { if self . offset == 0 { self . start ( ) . await ? ; } if self . state != State :: Started { return Err ( Error :: General ( " " . to_string ( ) ) ) ; } // compute file stats let num_rows = self . row_groups . iter ( ) . map ( | group | group . num_rows ) . sum ( ) ; let metadata = FileMetaData :: new ( self . options . version . into ( ) , self . schema . clone ( ) . into_thrift ( ) , num_rows , self . row_groups . clone ( ) , key_value_metadata , self . created_by . clone ( ) , None , None , None , ) ; let len = end_file ( & mut self . writer , metadata ) . await ? ; Ok ( self . offset + len ) }
Writes the footer of the parquet file.
Writes the footer of the parquet file .
&mut self
key_value_metadata
Option<Vec<KeyValue>>