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

Method ReadOneDictionary

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

Source from the content-addressed store, hash-verified

1678 }
1679
1680 Status ReadOneDictionary(int dict_index, Message* message,
1681 const IpcReadContext& context) {
1682 CHECK_HAS_BODY(*message);
1683 ARROW_ASSIGN_OR_RAISE(auto reader, Buffer::GetReader(message->body()));
1684 DictionaryKind kind;
1685 RETURN_NOT_OK(ReadDictionary(*message->metadata(), context, &kind, reader.get()));
1686 if (kind == DictionaryKind::Replacement) {
1687 return Status::Invalid("Unsupported dictionary replacement in IPC file");
1688 } else if (kind == DictionaryKind::Delta) {
1689 stats_.num_dictionary_deltas.fetch_add(1, std::memory_order_relaxed);
1690 }
1691 stats_.num_dictionary_batches.fetch_add(1, std::memory_order_relaxed);
1692 return Status::OK();
1693 }
1694
1695 Status AddDictionaryRanges(std::vector<io::ReadRange>* ranges) const {
1696 // Adds all dictionaries to the range cache

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected