Apache Arrow (C++)
A columnar in-memory analytics layer designed to accelerate big data.
Public Member Functions | List of all members
arrow::ipc::DictionaryMemo Class Reference

Memoization data structure for handling shared dictionaries. More...

#include <arrow/ipc/dictionary.h>

Public Member Functions

 DictionaryMemo ()
 
Status GetDictionary (int64_t id, std::shared_ptr< Array > *dictionary) const
 Returns KeyError if dictionary not found. More...
 
int64_t GetId (const std::shared_ptr< Array > &dictionary)
 Return id for dictionary, computing new id if necessary. More...
 
bool HasDictionary (const std::shared_ptr< Array > &dictionary) const
 Return true if dictionary array object is in this memo. More...
 
bool HasDictionaryId (int64_t id) const
 Return true if we have a dictionary for the input id. More...
 
Status AddDictionary (int64_t id, const std::shared_ptr< Array > &dictionary)
 Add a dictionary to the memo with a particular id. More...
 
const DictionaryMapid_to_dictionary () const
 
int size () const
 The number of dictionaries stored in the memo. More...
 

Detailed Description

Memoization data structure for handling shared dictionaries.

Constructor & Destructor Documentation

◆ DictionaryMemo()

arrow::ipc::DictionaryMemo::DictionaryMemo ( )

Member Function Documentation

◆ AddDictionary()

Status arrow::ipc::DictionaryMemo::AddDictionary ( int64_t  id,
const std::shared_ptr< Array > &  dictionary 
)

Add a dictionary to the memo with a particular id.

Returns KeyError if that dictionary already exists

◆ GetDictionary()

Status arrow::ipc::DictionaryMemo::GetDictionary ( int64_t  id,
std::shared_ptr< Array > *  dictionary 
) const

Returns KeyError if dictionary not found.

◆ GetId()

int64_t arrow::ipc::DictionaryMemo::GetId ( const std::shared_ptr< Array > &  dictionary)

Return id for dictionary, computing new id if necessary.

◆ HasDictionary()

bool arrow::ipc::DictionaryMemo::HasDictionary ( const std::shared_ptr< Array > &  dictionary) const

Return true if dictionary array object is in this memo.

◆ HasDictionaryId()

bool arrow::ipc::DictionaryMemo::HasDictionaryId ( int64_t  id) const

Return true if we have a dictionary for the input id.

◆ id_to_dictionary()

const DictionaryMap& arrow::ipc::DictionaryMemo::id_to_dictionary ( ) const
inline

◆ size()

int arrow::ipc::DictionaryMemo::size ( ) const
inline

The number of dictionaries stored in the memo.


The documentation for this class was generated from the following file: