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

Function read_dictionary

arrow-ipc/src/reader.rs:783–799  ·  view source on GitHub ↗

Read the dictionary from the buffer and provided metadata, updating the `dictionaries_by_id` with the resulting dictionary

(
    buf: &Buffer,
    batch: crate::DictionaryBatch,
    schema: &Schema,
    dictionaries_by_id: &mut HashMap<i64, ArrayRef>,
    metadata: &MetadataVersion,
)

Source from the content-addressed store, hash-verified

781/// Read the dictionary from the buffer and provided metadata,
782/// updating the `dictionaries_by_id` with the resulting dictionary
783pub fn read_dictionary(
784 buf: &Buffer,
785 batch: crate::DictionaryBatch,
786 schema: &Schema,
787 dictionaries_by_id: &mut HashMap<i64, ArrayRef>,
788 metadata: &MetadataVersion,
789) -> Result<(), ArrowError> {
790 read_dictionary_impl(
791 buf,
792 batch,
793 schema,
794 dictionaries_by_id,
795 metadata,
796 false,
797 UnsafeFlag::new(),
798 )
799}
800
801fn read_dictionary_impl(
802 buf: &Buffer,

Callers 3

extract_messageMethod · 0.85
dictionary_from_messageFunction · 0.85

Calls 1

read_dictionary_implFunction · 0.85

Tested by 2

dictionary_from_messageFunction · 0.68