Skip to content

Commit

Permalink
Fix bug turned up by compiling in fastbuild mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
emilyfertig committed Sep 18, 2024
1 parent 3b9173d commit 5fb5c96
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cxx/gendb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,13 @@ void GenDB::incorporate_query_relation(std::mt19937* prng,

T_noisy_relation t_query_rel =
std::get<T_noisy_relation>(hirm->schema.at(query_rel_name));
hirm->sample_and_incorporate_relation(prng, t_query_rel.base_relation,
base_items);
bool base_contains_items = std::visit(
[&](auto rel) { return rel->get_data().contains(base_items); },
hirm->get_relation(t_query_rel.base_relation));
if (!base_contains_items) {
hirm->sample_and_incorporate_relation(prng, t_query_rel.base_relation,
base_items);
}
hirm->incorporate(prng, query_rel_name, items, value);
}

Expand Down

0 comments on commit 5fb5c96

Please sign in to comment.