pub fn read_iox_metadata_from_parquet_metadata(
    parquet_md: &ParquetMetaData,
) -> Result<IoxMetadata> {
    let kv = parquet_md
        .file_metadata()
        .key_value_metadata()
        .as_ref()
        .context(IoxMetadataMissing)?
        .iter()
        .find(|kv| kv.key == METADATA_KEY)
        .context(IoxMetadataMissing)?;
    let json = kv.value.as_ref().context(IoxMetadataMissing)?;
    serde_json::from_str(json).context(IoxMetadataBroken)
}
/// Read IOx metadata from file-level key-value parquet metadata.
Read IOx metadata from file-level key-value parquet metadata.
Read IOx metadata from file - level key - value parquet metadata .
pub fn read_iox_metadata_from_parquet_metadata(
    parquet_md: &ParquetMetaData,
) -> Result<IoxMetadata> {
    let kv = parquet_md
        .file_metadata()
        .key_value_metadata()
        .as_ref()
        .context(IoxMetadataMissing)?
        .iter()
        .find(|kv| kv.key == METADATA_KEY)
        .context(IoxMetadataMissing)?;
    let json = kv.value.as_ref().context(IoxMetadataMissing)?;
    serde_json::from_str(json).context(IoxMetadataBroken)
}
pub fn read_iox_metadata_from_parquet_metadata ( parquet_md : & ParquetMetaData , ) -> Result < IoxMetadata > { let kv = parquet_md . file_metadata ( ) . key_value_metadata ( ) . as_ref ( ) . context ( IoxMetadataMissing ) ? . iter ( ) . find ( | kv | kv . key == METADATA_KEY ) . context ( IoxMetadataMissing ) ? ; let json = kv . value . as_ref ( ) . context ( IoxMetadataMissing ) ? ; serde_json :: from_str ( json ) . context ( IoxMetadataBroken ) }
Read IOx metadata from file-level key-value parquet metadata.
Read IOx metadata from file - level key - value parquet metadata .
parquet_md
&ParquetMetaData
parquet_md
&ParquetMetaData