Skip to content

Commit

Permalink
Merge pull request #1744 from kuzudb/fix-in-query-call
Browse files Browse the repository at this point in the history
fix in query call op bug
  • Loading branch information
acquamarin committed Jun 30, 2023
2 parents 8172ee7 + 93a7e37 commit e704660
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
5 changes: 0 additions & 5 deletions src/include/processor/operator/call/in_query_call.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ struct InQueryCallSharedState {

explicit InQueryCallSharedState(common::offset_t maxOffset) : maxOffset{maxOffset} {}

inline bool hasNext() {
std::lock_guard guard{mtx};
return offset < maxOffset;
}

std::pair<common::offset_t, common::offset_t> getNextBatch();
};

Expand Down
7 changes: 4 additions & 3 deletions src/processor/operator/call/in_query_call.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ void InQueryCall::initLocalStateInternal(ResultSet* resultSet, ExecutionContext*
}

bool InQueryCall::getNextTuplesInternal(kuzu::processor::ExecutionContext* context) {
if (sharedState->hasNext()) {
auto morsel = sharedState->getNextBatch();
auto morsel = sharedState->getNextBatch();
if (morsel.second > morsel.first) {
inQueryCallInfo->tableFunc(morsel, inQueryCallInfo->bindData.get(), outputVectors);
metrics->numOutputTuple.increase(morsel.second - morsel.first);
return true;
} else {
return false;
}
return false;
}

} // namespace processor
Expand Down

0 comments on commit e704660

Please sign in to comment.