Skip to content

Commit 8acf94b

Browse files
authored
ESQL: Refine assertion in Driver (#130127)
Refines an assertion that the next operator is never finished, which is actually possible if the next operator is an ExchangeSinkOperator.
1 parent 5931f08 commit 8acf94b

File tree

1 file changed

+2
-1
lines changed
  • x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/operator

1 file changed

+2
-1
lines changed

x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/operator/Driver.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,8 @@ private IsBlockedResult runSingleLoopIteration() {
267267

268268
if (op.isFinished() == false && nextOp.needsInput()) {
269269
driverContext.checkForEarlyTermination();
270-
assert nextOp.isFinished() == false : "next operator should not be finished yet: " + nextOp;
270+
assert nextOp.isFinished() == false || nextOp instanceof ExchangeSinkOperator
271+
: "next operator should not be finished yet: " + nextOp;
271272
Page page = op.getOutput();
272273
if (page == null) {
273274
// No result, just move to the next iteration

0 commit comments

Comments
 (0)