OmniSciDB  a987f07e93
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StringDictionary.h File Reference
#include "DictRef.h"
#include "DictionaryCache.hpp"
#include "StringOps/StringOpInfo.h"
#include <functional>
#include <future>
#include <map>
#include <shared_mutex>
#include <string>
#include <string_view>
#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
 
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 DictRef dest_dict_ref, const std::vector< int32_t > &source_ids, const DictRef source_dict_ref, 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 DictRef  dest_dict_ref,
const std::vector< int32_t > &  source_ids,
const DictRef  source_dict_ref,
const int32_t  dest_generation 
)

Definition at line 2034 of file StringDictionary.cpp.

References StringDictionaryClient::translate_string_ids().

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

2039  {
2040  DictRef temp_dict_ref(-1, -1);
2041  StringDictionaryClient string_client(dict_server_host, temp_dict_ref, false);
2042  string_client.translate_string_ids(
2043  dest_ids, dest_dict_ref, source_ids, source_dict_ref, dest_generation);
2044 }

+ 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:302
static constexpr int32_t INVALID_STR_ID

+ Here is the caller graph for this function:

Variable Documentation

bool g_enable_stringdict_parallel