pub(crate) fn try_from_thrift(
        schema_descr: &SchemaDescriptor,
        rg: RowGroup,
    ) -> Result<RowGroupMetaData> {
        if schema_descr.columns().len() != rg.columns.len() {
            return Err(Error::OutOfSpec(format!("The number of columns in the row group ({}) must be equal to the number of columns in the schema ({})", rg.columns.len(), schema_descr.columns().len())));
        }
        let total_byte_size = rg.total_byte_size.try_into()?;
        let num_rows = rg.num_rows.try_into()?;
        let columns = rg
            .columns
            .into_iter()
            .zip(schema_descr.columns())
            .map(|(column_chunk, descriptor)| {
                ColumnChunkMetaData::try_from_thrift(descriptor.clone(), column_chunk)
            })
            .collect::<Result<Vec<_>>>()?;

        Ok(RowGroupMetaData {
            columns,
            num_rows,
            total_byte_size,
        })
    }
/// Method to convert from Thrift.
Method to convert from Thrift.
Method to convert from Thrift .
pub(crate) fn try_from_thrift(
        schema_descr: &SchemaDescriptor,
        rg: RowGroup,
    ) -> Result<RowGroupMetaData> {
        if schema_descr.columns().len() != rg.columns.len() {
            return Err(Error::OutOfSpec(format!("The number of columns in the row group ({}) must be equal to the number of columns in the schema ({})", rg.columns.len(), schema_descr.columns().len())));
        }
        let total_byte_size = rg.total_byte_size.try_into()?;
        let num_rows = rg.num_rows.try_into()?;
        let columns = rg
            .columns
            .into_iter()
            .zip(schema_descr.columns())
            .map(|(column_chunk, descriptor)| {
                ColumnChunkMetaData::try_from_thrift(descriptor.clone(), column_chunk)
            })
            .collect::<Result<Vec<_>>>()?;
        Ok(RowGroupMetaData {
            columns,
            num_rows,
            total_byte_size,
        })
    }
pub ( crate ) fn try_from_thrift ( schema_descr : & SchemaDescriptor , rg : RowGroup , ) -> Result < RowGroupMetaData > { if schema_descr . columns ( ) . len ( ) != rg . columns . len ( ) { return Err ( Error :: OutOfSpec ( format ! ( " " rg columns len ( ) schema_descr columns ( ) len ( ) ) ) ) ; } let total_byte_size = rg . total_byte_size . try_into ( ) ? ; let num_rows = rg . num_rows . try_into ( ) ? ; let columns = rg . columns . into_iter ( ) . zip ( schema_descr . columns ( ) ) . map ( | ( column_chunk , descriptor ) | { ColumnChunkMetaData :: try_from_thrift ( descriptor . clone ( ) , column_chunk ) } ) . collect :: < Result < Vec < _ > > > ( ) ? ; Ok ( RowGroupMetaData { columns , num_rows , total_byte_size , } ) }
Method to convert from Thrift.
Method to convert from Thrift .
schema_descr
&SchemaDescriptor
rg
RowGroup