Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit 74036a2

Browse files
committed
Rename StringDictionaryProxy::getDictionary and StringDictionaryProxy::getGeneration.
Signed-off-by: ienkovich <[email protected]>
1 parent 4e9032a commit 74036a2

File tree

7 files changed

+20
-18
lines changed

7 files changed

+20
-18
lines changed

omniscidb/QueryEngine/JoinHashTable/HashJoin.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,10 @@ const StringDictionaryProxy::IdMap* HashJoin::translateInnerToOuterStrDictProxie
343343
const bool translate_dictionary =
344344
inner_outer_proxies.first && inner_outer_proxies.second;
345345
if (translate_dictionary) {
346-
const auto inner_dict_id = inner_outer_proxies.first->getDictionary()->getDictId();
347-
const auto outer_dict_id = inner_outer_proxies.second->getDictionary()->getDictId();
346+
const auto inner_dict_id =
347+
inner_outer_proxies.first->getBaseDictionary()->getDictId();
348+
const auto outer_dict_id =
349+
inner_outer_proxies.second->getBaseDictionary()->getDictId();
348350
CHECK_NE(inner_dict_id, outer_dict_id);
349351
return executor->getIntersectionStringProxyTranslationMap(
350352
inner_outer_proxies.first,
@@ -406,7 +408,7 @@ CompositeKeyInfo HashJoin::getCompositeKeyInfo(
406408
CHECK(sd_inner_proxy && sd_outer_proxy);
407409
sd_inner_proxy_per_key.push_back(sd_inner_proxy);
408410
sd_outer_proxy_per_key.push_back(sd_outer_proxy);
409-
cache_key_chunks_for_column.push_back(sd_outer_proxy->getGeneration());
411+
cache_key_chunks_for_column.push_back(sd_outer_proxy->getBaseGeneration());
410412
} else {
411413
sd_inner_proxy_per_key.emplace_back();
412414
sd_outer_proxy_per_key.emplace_back();
@@ -436,8 +438,8 @@ HashJoin::translateCompositeStrDictProxies(const CompositeKeyInfo& composite_key
436438
CHECK(inner_proxy);
437439
CHECK(outer_proxy);
438440

439-
CHECK_NE(inner_proxy->getDictionary()->getDictId(),
440-
outer_proxy->getDictionary()->getDictId());
441+
CHECK_NE(inner_proxy->getBaseDictionary()->getDictId(),
442+
outer_proxy->getBaseDictionary()->getDictId());
441443
proxy_translation_maps.emplace_back(
442444
executor->getIntersectionStringProxyTranslationMap(
443445
inner_proxy, outer_proxy, executor->getRowSetMemoryOwner()));

omniscidb/QueryEngine/Visitors/TransientStringLiteralsVisitor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class TransientStringLiteralsVisitor : public hdk::ir::ExprVisitor<void> {
5757
}
5858
auto uoper_dict_id = uoper_type->as<hdk::ir::ExtDictionaryType>()->dictId();
5959
auto operand_dict_id = operand_type->as<hdk::ir::ExtDictionaryType>()->dictId();
60-
if (uoper_dict_id != sdp_->getDictionary()->getDictId()) {
60+
if (uoper_dict_id != sdp_->getBaseDictionary()->getDictId()) {
6161
// If we are not casting to our dictionary (sdp_
6262
return;
6363
}

omniscidb/ResultSet/ResultSet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ const std::vector<std::string> ResultSet::getStringDictionaryPayloadCopy(
851851
const int dict_id) const {
852852
const auto sdp = row_set_mem_owner_->getOrAddStringDictProxy(dict_id);
853853
CHECK(sdp);
854-
return sdp->getDictionary()->copyStrings();
854+
return sdp->getBaseDictionary()->copyStrings();
855855
}
856856

857857
const std::pair<std::vector<int32_t>, std::vector<std::string>>

omniscidb/ResultSet/RowSetMemoryOwner.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ class RowSetMemoryOwner final : public SimpleAllocator, boost::noncopyable {
182182
std::lock_guard<std::mutex> lock(state_mutex_);
183183
auto it = str_dict_proxy_owned_.find(dict_id);
184184
if (it != str_dict_proxy_owned_.end()) {
185-
CHECK_EQ(it->second->getDictionary(), str_dict.get());
185+
CHECK_EQ(it->second->getBaseDictionary(), str_dict.get());
186186
it->second->updateGeneration(generation);
187187
return it->second.get();
188188
}
@@ -197,8 +197,8 @@ class RowSetMemoryOwner final : public SimpleAllocator, boost::noncopyable {
197197
const StringDictionaryProxy* source_proxy,
198198
const StringDictionaryProxy* dest_proxy) {
199199
std::lock_guard<std::mutex> lock(state_mutex_);
200-
const auto map_key = std::make_pair(source_proxy->getDictionary()->getDictId(),
201-
dest_proxy->getDictionary()->getDictId());
200+
const auto map_key = std::make_pair(source_proxy->getBaseDictionary()->getDictId(),
201+
dest_proxy->getBaseDictionary()->getDictId());
202202
auto it = str_proxy_intersection_translation_maps_owned_.find(map_key);
203203
if (it == str_proxy_intersection_translation_maps_owned_.end()) {
204204
it = str_proxy_intersection_translation_maps_owned_
@@ -214,8 +214,8 @@ class RowSetMemoryOwner final : public SimpleAllocator, boost::noncopyable {
214214
const StringDictionaryProxy* source_proxy,
215215
StringDictionaryProxy* dest_proxy) {
216216
std::lock_guard<std::mutex> lock(state_mutex_);
217-
const auto map_key = std::make_pair(source_proxy->getDictionary()->getDictId(),
218-
dest_proxy->getDictionary()->getDictId());
217+
const auto map_key = std::make_pair(source_proxy->getBaseDictionary()->getDictId(),
218+
dest_proxy->getBaseDictionary()->getDictId());
219219
auto it = str_proxy_union_translation_maps_owned_.find(map_key);
220220
if (it == str_proxy_union_translation_maps_owned_.end()) {
221221
it = str_proxy_union_translation_maps_owned_

omniscidb/StringDictionary/StringDictionaryProxy.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,11 +637,11 @@ size_t StringDictionaryProxy::transientLookupBulkParallelUnlocked(
637637
return num_strings_not_found;
638638
}
639639

640-
StringDictionary* StringDictionaryProxy::getDictionary() const noexcept {
640+
StringDictionary* StringDictionaryProxy::getBaseDictionary() const noexcept {
641641
return string_dict_.get();
642642
}
643643

644-
int64_t StringDictionaryProxy::getGeneration() const noexcept {
644+
int64_t StringDictionaryProxy::getBaseGeneration() const noexcept {
645645
return generation_;
646646
}
647647

omniscidb/StringDictionary/StringDictionaryProxy.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ class StringDictionaryProxy {
4646

4747
// enum SetOp { kUnion = 0, kIntersection };
4848

49-
StringDictionary* getDictionary() const noexcept;
50-
int64_t getGeneration() const noexcept;
49+
StringDictionary* getBaseDictionary() const noexcept;
50+
int64_t getBaseGeneration() const noexcept;
5151

5252
/**
5353
* @brief Executes read-only lookup of a vector of strings and returns a vector of their

omniscidb/Tests/StringDictionaryTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,13 +716,13 @@ TEST(StringDictionaryProxy, BuildUnionTranslationMapToPartialOverlapProxy) {
716716
StringDictionaryProxy dest_sdp(dest_sd, dest_sd->storageEntryCount());
717717
const auto transient_source_strings = add_strings_numeric_range(
718718
source_sdp, num_source_transient_entries, source_transient_start_val);
719-
ASSERT_EQ(source_sdp.getDictionary()->getDictId(), 1);
719+
ASSERT_EQ(source_sdp.getBaseDictionary()->getDictId(), 1);
720720
ASSERT_EQ(source_sdp.storageEntryCount(), num_source_persisted_entries);
721721
ASSERT_EQ(source_sdp.transientEntryCount(), num_source_transient_entries);
722722

723723
const auto transient_dest_strings = add_strings_numeric_range(
724724
dest_sdp, num_dest_transient_entries, dest_transient_start_val);
725-
ASSERT_EQ(dest_sdp.getDictionary()->getDictId(), 2);
725+
ASSERT_EQ(dest_sdp.getBaseDictionary()->getDictId(), 2);
726726
ASSERT_EQ(dest_sdp.storageEntryCount(), num_dest_persisted_entries);
727727
ASSERT_EQ(dest_sdp.transientEntryCount(), num_dest_transient_entries);
728728

0 commit comments

Comments
 (0)