OmniSciDB
94e8789169
|
#include <StringDictionaryProxy.h>
Public Member Functions | |
StringDictionaryProxy (std::shared_ptr< StringDictionary > sd, const int64_t generation) | |
int32_t | getOrAdd (const std::string &str) noexcept |
StringDictionary * | getDictionary () noexcept |
int64_t | getGeneration () const noexcept |
int32_t | getOrAddTransient (const std::string &str) |
int32_t | getIdOfString (const std::string &str) const |
int32_t | getIdOfStringNoGeneration (const std::string &str) const |
std::string | getString (int32_t string_id) const |
std::pair< const char *, size_t > | getStringBytes (int32_t string_id) const noexcept |
size_t | storageEntryCount () const |
void | updateGeneration (const int64_t generation) noexcept |
std::vector< int32_t > | getLike (const std::string &pattern, const bool icase, const bool is_simple, const char escape) const |
std::vector< int32_t > | getCompare (const std::string &pattern, const std::string &comp_operator) const |
std::vector< int32_t > | getRegexpLike (const std::string &pattern, const char escape) const |
const std::map< int32_t, std::string > | getTransientMapping () const |
Private Attributes | |
std::shared_ptr< StringDictionary > | string_dict_ |
std::map< int32_t, std::string > | transient_int_to_str_ |
std::map< std::string, int32_t > | transient_str_to_int_ |
int64_t | generation_ |
mapd_shared_mutex | rw_mutex_ |
Definition at line 29 of file StringDictionaryProxy.h.
StringDictionaryProxy::StringDictionaryProxy | ( | std::shared_ptr< StringDictionary > | sd, |
const int64_t | generation | ||
) |
Definition at line 28 of file StringDictionaryProxy.cpp.
std::vector< int32_t > StringDictionaryProxy::getCompare | ( | const std::string & | pattern, |
const std::string & | comp_operator | ||
) | const |
Definition at line 167 of file StringDictionaryProxy.cpp.
References CHECK_GE, anonymous_namespace{StringDictionaryProxy.cpp}::do_compare(), generation_, getString(), run_benchmark_import::result, string_dict_, and transient_int_to_str_.
Referenced by anonymous_namespace{StringOpsIR.cpp}::get_compared_ids().
|
noexcept |
Definition at line 234 of file StringDictionaryProxy.cpp.
References string_dict_.
|
noexcept |
int32_t StringDictionaryProxy::getIdOfString | ( | const std::string & | str | ) | const |
Definition at line 65 of file StringDictionaryProxy.cpp.
References CHECK_GE, generation_, StringDictionary::INVALID_STR_ID, rw_mutex_, string_dict_, transient_str_to_int_, and truncate_to_generation().
Referenced by anonymous_namespace{RelAlgTranslator.cpp}::fill_dictionary_encoded_in_vals(), and string_compress().
int32_t StringDictionaryProxy::getIdOfStringNoGeneration | ( | const std::string & | str | ) | const |
Definition at line 77 of file StringDictionaryProxy.cpp.
References StringDictionary::INVALID_STR_ID, rw_mutex_, string_dict_, and transient_str_to_int_.
std::vector< int32_t > StringDictionaryProxy::getLike | ( | const std::string & | pattern, |
const bool | icase, | ||
const bool | is_simple, | ||
const char | escape | ||
) | const |
Definition at line 128 of file StringDictionaryProxy.cpp.
References CHECK_GE, generation_, getString(), anonymous_namespace{StringDictionary.cpp}::is_like(), run_benchmark_import::result, string_dict_, and transient_int_to_str_.
|
noexcept |
Definition at line 204 of file StringDictionaryProxy.cpp.
Referenced by DictionaryValueConverter< TARGET_TYPE >::convertTransientStringIdToPermanentId().
int32_t StringDictionaryProxy::getOrAddTransient | ( | const std::string & | str | ) |
Definition at line 40 of file StringDictionaryProxy.cpp.
References CHECK, CHECK_GE, generation_, StringDictionary::INVALID_STR_ID, rw_mutex_, string_dict_, transient_int_to_str_, transient_str_to_int_, and truncate_to_generation().
Referenced by lower_encoded().
std::vector< int32_t > StringDictionaryProxy::getRegexpLike | ( | const std::string & | pattern, |
const char | escape | ||
) | const |
Definition at line 191 of file StringDictionaryProxy.cpp.
References CHECK_GE, generation_, getString(), anonymous_namespace{StringDictionary.cpp}::is_regexp_like(), run_benchmark_import::result, string_dict_, and transient_int_to_str_.
std::string StringDictionaryProxy::getString | ( | int32_t | string_id | ) | const |
Definition at line 88 of file StringDictionaryProxy.cpp.
References CHECK, CHECK_NE, StringDictionary::INVALID_STR_ID, rw_mutex_, string_dict_, and transient_int_to_str_.
Referenced by anonymous_namespace{ResultSetIteration.cpp}::build_string_array_target_value(), StringValueConverter::convertToColumnarFormatFromDict(), DictionaryValueConverter< TARGET_TYPE >::convertTransientStringIdToPermanentId(), anonymous_namespace{RelAlgTranslator.cpp}::fill_dictionary_encoded_in_vals(), getCompare(), getLike(), getRegexpLike(), lower_encoded(), GenericKeyHandler::operator()(), and anonymous_namespace{HashJoinRuntime.cpp}::translate_str_id_to_outer_dict().
|
noexcept |
Definition at line 208 of file StringDictionaryProxy.cpp.
References CHECK, CHECK_NE, and StringDictionary::INVALID_STR_ID.
Referenced by anonymous_namespace{ExternalExecutor.cpp}::decode_string(), and string_decompress().
|
inline |
Definition at line 55 of file StringDictionaryProxy.h.
References transient_int_to_str_.
Referenced by DictionaryValueConverter< TARGET_TYPE >::DictionaryValueConverter(), and DictionaryValueConverter< TARGET_TYPE >::processBuffer().
size_t StringDictionaryProxy::storageEntryCount | ( | ) | const |
Definition at line 219 of file StringDictionaryProxy.cpp.
References string_dict_.
|
noexcept |
|
private |
Definition at line 63 of file StringDictionaryProxy.h.
Referenced by getCompare(), getGeneration(), getIdOfString(), getLike(), getOrAddTransient(), and getRegexpLike().
|
mutableprivate |
Definition at line 64 of file StringDictionaryProxy.h.
Referenced by getIdOfString(), getIdOfStringNoGeneration(), getOrAddTransient(), and getString().
|
private |
Definition at line 60 of file StringDictionaryProxy.h.
Referenced by getCompare(), getDictionary(), getIdOfString(), getIdOfStringNoGeneration(), getLike(), getOrAddTransient(), getRegexpLike(), getString(), and storageEntryCount().
|
private |
Definition at line 61 of file StringDictionaryProxy.h.
Referenced by getCompare(), getLike(), getOrAddTransient(), getRegexpLike(), getString(), and getTransientMapping().
|
private |
Definition at line 62 of file StringDictionaryProxy.h.
Referenced by getIdOfString(), getIdOfStringNoGeneration(), and getOrAddTransient().