Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinTF committed Dec 2, 2024
1 parent d1d1c56 commit 5b4ec8e
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/engine/IndexScan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,6 @@ struct IndexScan::SharedGeneratorState {
AD_CORRECTNESS_CHECK(!joinColumn.empty());
// Skip processing for undef case, it will be handled differently
if (hasUndef_) {
prefetchedValues_.push_back(std::move(*iterator_.value()));
return;
}
AD_CORRECTNESS_CHECK(!joinColumn[0].isUndefined());
Expand Down Expand Up @@ -591,14 +590,8 @@ struct IndexScan::SharedGeneratorState {
Result::Generator IndexScan::createPrefilteredJoinSide(
std::shared_ptr<SharedGeneratorState> innerState) {
if (innerState->hasUndef()) {
for (Result::IdTableVocabPair& pair : innerState->prefetchedValues_) {
co_yield pair;
}
innerState->prefetchedValues_.clear();
AD_CORRECTNESS_CHECK(innerState->prefetchedValues_.empty());
auto& iterator = innerState->iterator_.value();
if (iterator != innerState->generator_.end()) {
++iterator;
}
while (iterator != innerState->generator_.end()) {
co_yield *iterator;
++iterator;
Expand Down

0 comments on commit 5b4ec8e

Please sign in to comment.