MCPcopy Create free account
hub / github.com/apache/arrow-rs / prepare_schema_for_flight

Function prepare_schema_for_flight

arrow-flight/src/encode.rs:651–663  ·  view source on GitHub ↗

Prepare an arrow Schema for transport over the Arrow Flight protocol Convert dictionary types to underlying types See hydrate_dictionary for more information

(
    schema: &Schema,
    dictionary_tracker: &mut DictionaryTracker,
    send_dictionaries: bool,
)

Source from the content-addressed store, hash-verified

649///
650/// See hydrate_dictionary for more information
651fn prepare_schema_for_flight(
652 schema: &Schema,
653 dictionary_tracker: &mut DictionaryTracker,
654 send_dictionaries: bool,
655) -> Schema {
656 let fields: Fields = schema
657 .fields()
658 .iter()
659 .map(|field| prepare_field_for_flight(field, dictionary_tracker, send_dictionaries))
660 .collect();
661
662 Schema::new(fields).with_metadata(schema.metadata().clone())
663}
664
665/// Split [`RecordBatch`] so it hopefully fits into a gRPC response.
666///

Callers 2

encode_schemaMethod · 0.70

Calls 7

prepare_field_for_flightFunction · 0.85
collectMethod · 0.80
iterMethod · 0.45
fieldsMethod · 0.45
with_metadataMethod · 0.45
cloneMethod · 0.45
metadataMethod · 0.45

Tested by 1