Skip to content

Commit

Permalink
Remove redundant VELOX_CHECK(op->isInitialized()); (#8003)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #8003

Just above in the same method we call initializeOperators();
So the check is redundant.
Also, a couple of cosmetic changes.

Reviewed By: xiaoxmeng, amitkdutta

Differential Revision: D52101298

fbshipit-source-id: 216636932393113a79d3c60bbef22ca20e89a913
  • Loading branch information
Sergey Pershin authored and facebook-github-bot committed Dec 13, 2023
1 parent 75f4b29 commit 085c753
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions velox/exec/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,9 +485,9 @@ StopReason Driver::runInternal(

try {
// Invoked to initialize the operators once before driver starts execution.
self->initializeOperators();
initializeOperators();

TestValue::adjust("facebook::velox::exec::Driver::runInternal", self.get());
TestValue::adjust("facebook::velox::exec::Driver::runInternal", this);

const int32_t numOperators = operators_.size();
ContinueFuture future;
Expand All @@ -501,11 +501,10 @@ StopReason Driver::runInternal(
}

auto op = operators_[i].get();
VELOX_CHECK(op->isInitialized());

// In case we are blocked, this index will point to the operator, whose
// queuedTime we should update.
curOperatorId_ = i;

CALL_OPERATOR(
blockingReason_ = op->isBlocked(&future),
op,
Expand All @@ -517,9 +516,10 @@ StopReason Driver::runInternal(
guard.notThrown();
return StopReason::kBlock;
}
Operator* nextOp = nullptr;
if (i < operators_.size() - 1) {
nextOp = operators_[i + 1].get();

if (i < numOperators - 1) {
Operator* nextOp = operators_[i + 1].get();

CALL_OPERATOR(
blockingReason_ = nextOp->isBlocked(&future),
nextOp,
Expand Down

0 comments on commit 085c753

Please sign in to comment.