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

Function read_dictionary_impl

arrow-ipc/src/reader.rs:801–825  ·  view source on GitHub ↗
(
    buf: &Buffer,
    batch: crate::DictionaryBatch,
    schema: &Schema,
    dictionaries_by_id: &mut HashMap<i64, ArrayRef>,
    metadata: &MetadataVersion,
    require_alignment: bool,
    skip_v

Source from the content-addressed store, hash-verified

799}
800
801fn read_dictionary_impl(
802 buf: &Buffer,
803 batch: crate::DictionaryBatch,
804 schema: &Schema,
805 dictionaries_by_id: &mut HashMap<i64, ArrayRef>,
806 metadata: &MetadataVersion,
807 require_alignment: bool,
808 skip_validation: UnsafeFlag,
809) -> Result<(), ArrowError> {
810 let id = batch.id();
811
812 let dictionary_values = get_dictionary_values(
813 buf,
814 batch,
815 schema,
816 dictionaries_by_id,
817 metadata,
818 require_alignment,
819 skip_validation,
820 )?;
821
822 update_dictionaries(dictionaries_by_id, batch.isDelta(), id, dictionary_values)?;
823
824 Ok(())
825}
826
827/// Updates the `dictionaries_by_id` with the provided dictionary values and id.
828///

Callers 3

read_dictionaryFunction · 0.85
read_dictionaryMethod · 0.85
decodeMethod · 0.85

Calls 4

get_dictionary_valuesFunction · 0.85
update_dictionariesFunction · 0.85
isDeltaMethod · 0.80
idMethod · 0.45

Tested by

no test coverage detected