OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StringDictionary.h File Reference
#include <functional>
#include <future>
#include <map>
#include <shared_mutex>
#include <string>
#include <string_view>
#include <tuple>
#include <vector>
#include "DictRef.h"
#include "DictionaryCache.hpp"
#include "Shared/DbObjectKeys.h"
#include "StringOps/StringOpInfo.h"
+ 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
 
class  StringDictionary::StringCallback
 
struct  StringDictionary::StringIdxEntry
 
struct  StringDictionary::compare_cache_value_t
 
struct  StringDictionary::PayloadString
 

Namespaces

 StringOps_Namespace
 

Typedefs

using string_dict_hash_t = uint32_t
 
using StringLookupCallback = std::function< bool(std::string_view, int32_t string_id)>
 

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 shared::StringDictKey &dest_dict_key, const std::vector< int32_t > &source_ids, const shared::StringDictKey &source_dict_key, const int32_t dest_generation)
 

Variables

bool g_enable_stringdict_parallel
 

Typedef Documentation

using string_dict_hash_t = uint32_t

Definition at line 50 of file StringDictionary.h.

using StringLookupCallback = std::function<bool(std::string_view, int32_t string_id)>

Definition at line 52 of file StringDictionary.h.

Function Documentation

void translate_string_ids ( std::vector< int32_t > &  dest_ids,
const LeafHostInfo dict_server_host,
const shared::StringDictKey dest_dict_key,
const std::vector< int32_t > &  source_ids,
const shared::StringDictKey source_dict_key,
const int32_t  dest_generation 
)

Definition at line 2095 of file StringDictionary.cpp.

References shared::StringDictKey::db_id, shared::StringDictKey::dict_id, and StringDictionaryClient::translate_string_ids().

Referenced by anonymous_namespace{RelAlgTranslator.cpp}::fill_dictionary_encoded_in_vals(), and ResultSet::translateDictEncodedColumns().

2100  {
2101  shared::StringDictKey temp_dict_key(-1, -1);
2102  StringDictionaryClient string_client(
2103  dict_server_host, {temp_dict_key.db_id, temp_dict_key.dict_id}, false);
2104  string_client.translate_string_ids(dest_ids,
2105  {dest_dict_key.db_id, dest_dict_key.dict_id},
2106  source_ids,
2107  {source_dict_key.db_id, source_dict_key.dict_id},
2108  dest_generation);
2109 }
void translate_string_ids(std::vector< int32_t > &dest_ids, const DictRef dest_dict_ref, const std::vector< int32_t > &source_ids, const DictRef source_dict_ref, const int32_t dest_generation)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int32_t truncate_to_generation ( const int32_t  id,
const size_t  generation 
)

Definition at line 44 of file StringDictionaryProxy.cpp.

References CHECK_GE, and StringDictionary::INVALID_STR_ID.

Referenced by StringDictionaryProxy::getIdOfStringFromClient().

44  {
46  return id;
47  }
48  CHECK_GE(id, 0);
49  return static_cast<size_t>(id) >= generation ? StringDictionary::INVALID_STR_ID : id;
50 }
#define CHECK_GE(x, y)
Definition: Logger.h:306
static constexpr int32_t INVALID_STR_ID

+ Here is the caller graph for this function:

Variable Documentation

bool g_enable_stringdict_parallel