Skip to content

Commit

Permalink
Hack around double-finalize issue
Browse files Browse the repository at this point in the history
  • Loading branch information
royi-luo committed Aug 21, 2024
1 parent b49c0c9 commit 52a87d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/include/processor/operator/physical_operator.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ class PhysicalOperator {
physical_op_vector_t children;
ResultSet* resultSet;
std::unique_ptr<OPPrintInfo> printInfo;

bool hasBeenFinalized = false;
};

} // namespace processor
Expand Down
4 changes: 4 additions & 0 deletions src/processor/operator/physical_operator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ bool PhysicalOperator::getNextTuple(ExecutionContext* context) {
}

void PhysicalOperator::finalize(ExecutionContext* context) {
if (hasBeenFinalized) {
return;
}
hasBeenFinalized = true;
if (!isSource()) {
for (auto& child : children) {
child->finalize(context);
Expand Down

0 comments on commit 52a87d7

Please sign in to comment.