Skip to content

Commit

Permalink
Check empty table instead of vocab
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinTF committed Nov 25, 2024
1 parent ad0128a commit f88d4b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/engine/AddCombinedRowToTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ class AddCombinedRowToIdTable {
}
}

// Merge the vocab contained in `T` with the `mergedVocab_` and set the passed
// pointer reference to the proper value.
// Merge the local vocab contained in `T` with the `mergedVocab_` and set the
// passed pointer reference to that vocab.
template <typename T>
void mergeVocab(const T& table, const LocalVocab*& currentVocab) {
AD_CORRECTNESS_CHECK(currentVocab == nullptr);
Expand Down Expand Up @@ -345,7 +345,7 @@ class AddCombinedRowToIdTable {
std::invoke(blockwiseCallback_, result, mergedVocab_);
// The current `IdTable`s might still be active, so we have to merge the
// local vocabs again if all other sets were moved-out.
if (mergedVocab_.numSets() == 1) {
if (resultTable_.empty()) {
// Make sure to reset `mergedVocab_` so it is in a valid state again.
mergedVocab_ = LocalVocab{};
// Only merge non-null vocabs.
Expand Down

0 comments on commit f88d4b8

Please sign in to comment.