pub fn infer_schema(file_metadata: &FileMetaData) -> Result<Schema>
Expand description
Infers a Schema
from parquet’s FileMetaData
. This first looks for the metadata key
"ARROW:schema"
; if it does not exist, it converts the parquet types declared in the
file’s parquet schema to Arrow’s equivalent.
§Error
This function errors iff the key "ARROW:schema"
exists but is not correctly encoded,
indicating that that the file’s arrow metadata was incorrectly written.