/// Convert dictionary types to underlying types
/// See hydrate_dictionary for more information
Convert dictionary types to underlying types
See hydrate_dictionary for more information
Convert dictionary types to underlying types See hydrate_dictionary for more information
pub fn optimize_schema(schema: &Schema) -> Schema {
    let fields = schema
        .fields()
        .iter()
        .map(|field| match field.data_type() {
            DataType::Dictionary(_, value_type) => Field::new(
                field.name(),
                value_type.as_ref().clone(),
                field.is_nullable(),
            ),
            _ => field.clone(),
        })
        .collect();
    Schema::new(fields)
}
pub fn optimize_schema ( schema : & Schema ) -> Schema { let fields = schema . fields ( ) . iter ( ) . map ( | field | match field . data_type ( ) { DataType :: Dictionary ( _ , value_type ) => Field :: new ( field . name ( ) , value_type . as_ref ( ) . clone ( ) , field . is_nullable ( ) , ) , _ => field . clone ( ) , } ) . collect ( ) ; Schema :: new ( fields ) }
Convert dictionary types to underlying types
See hydrate_dictionary for more information
Convert dictionary types to underlying types See hydrate_dictionary for more information
schema
&Schema