MCPcopy Create free account
hub / github.com/apache/arrow / ReadOneDictionary

Method ReadOneDictionary

cpp/src/arrow/ipc/reader.cc:1695–1708  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1693 }
1694
1695 Status ReadOneDictionary(int dict_index, Message* message,
1696 const IpcReadContext& context) {
1697 CHECK_HAS_BODY(*message);
1698 ARROW_ASSIGN_OR_RAISE(auto reader, Buffer::GetReader(message->body()));
1699 DictionaryKind kind;
1700 RETURN_NOT_OK(ReadDictionary(*message->metadata(), context, &kind, reader.get()));
1701 if (kind == DictionaryKind::Replacement) {
1702 return Status::Invalid("Unsupported dictionary replacement in IPC file");
1703 } else if (kind == DictionaryKind::Delta) {
1704 stats_.num_dictionary_deltas.fetch_add(1, std::memory_order_relaxed);
1705 }
1706 stats_.num_dictionary_batches.fetch_add(1, std::memory_order_relaxed);
1707 return Status::OK();
1708 }
1709
1710 Status AddDictionaryRanges(std::vector<io::ReadRange>* ranges) const {
1711 // Adds all dictionaries to the range cache

Callers

nothing calls this directly

Calls 5

ReadDictionaryFunction · 0.70
InvalidFunction · 0.50
OKFunction · 0.50
metadataMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected