diff --git a/src/engine/Join.cpp b/src/engine/Join.cpp index 991c55b1f1..69a23177d9 100644 --- a/src/engine/Join.cpp +++ b/src/engine/Join.cpp @@ -31,20 +31,13 @@ namespace { // more efficient access in the join columns below and apply the given // permutation to each table. cppcoro::generator> convertGenerator( - Result::Generator gen, std::vector permutation) { + Result::Generator gen, std::vector permutation = {}) { for (auto& [table, localVocab] : gen) { // Make sure to actually move the table into the wrapper so that the tables // live as long as the wrapper. - table.setColumnSubset(permutation); - ad_utility::IdTableAndFirstCol t{std::move(table), std::move(localVocab)}; - co_yield t; - } -} -// Convert a `generator` to a `generator` for -// more efficient access in the join columns below. -cppcoro::generator> convertGenerator( - Result::Generator gen) { - for (auto& [table, localVocab] : gen) { + if (!permutation.empty()) { + table.setColumnSubset(permutation); + } ad_utility::IdTableAndFirstCol t{std::move(table), std::move(localVocab)}; co_yield t; }