OmniSciDB  04ee39c94c
StringDictionary.h File Reference
#include "../Shared/mapd_shared_mutex.h"
#include "DictRef.h"
#include "DictionaryCache.hpp"
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <future>
#include <map>
#include <string>
#include <tuple>
#include <vector>
+ Include dependency graph for StringDictionary.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  DictPayloadUnavailable
 
class  StringDictionary
 
struct  StringDictionary::StringIdxEntry
 
struct  StringDictionary::compare_cache_value_t
 
struct  StringDictionary::PayloadString
 

Functions

int32_t truncate_to_generation (const int32_t id, const size_t generation)
 
void translate_string_ids (std::vector< int32_t > &dest_ids, const LeafHostInfo &dict_server_host, const DictRef dest_dict_ref, const std::vector< int32_t > &source_ids, const DictRef source_dict_ref, const int32_t dest_generation)
 

Function Documentation

◆ translate_string_ids()

void translate_string_ids ( std::vector< int32_t > &  dest_ids,
const LeafHostInfo dict_server_host,
const DictRef  dest_dict_ref,
const std::vector< int32_t > &  source_ids,
const DictRef  source_dict_ref,
const int32_t  dest_generation 
)

Definition at line 1192 of file StringDictionary.cpp.

References StringDictionaryClient::translate_string_ids().

Referenced by anonymous_namespace{RelAlgTranslator.cpp}::fill_dictionary_encoded_in_vals().

1197  {
1198  DictRef temp_dict_ref(-1, -1);
1199  StringDictionaryClient string_client(dict_server_host, temp_dict_ref, false);
1200  string_client.translate_string_ids(
1201  dest_ids, dest_dict_ref, source_ids, source_dict_ref, dest_generation);
1202 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ truncate_to_generation()

int32_t truncate_to_generation ( const int32_t  id,
const size_t  generation 
)

Definition at line 33 of file StringDictionaryProxy.cpp.

References CHECK_GE, and StringDictionary::INVALID_STR_ID.

Referenced by StringDictionaryProxy::getIdOfString(), and StringDictionaryProxy::getOrAddTransient().

33  {
35  return id;
36  }
37  CHECK_GE(id, 0);
38  return static_cast<size_t>(id) >= generation ? StringDictionary::INVALID_STR_ID : id;
39 }
#define CHECK_GE(x, y)
Definition: Logger.h:200
static constexpr int32_t INVALID_STR_ID
+ Here is the caller graph for this function: