Skip to content

Commit 5fc5860

Browse files
dnhatnmridula-s109
authored andcommitted
Allow LimitOperator in Driver assertion (elastic#130235)
The LimitOperator can be finished early because the Limiter may be shared across operators. This PR relaxes the assertion to allow for this. Closes elastic#130228 Closes elastic#130219
1 parent 8540f36 commit 5fc5860

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

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

268268
if (op.isFinished() == false && nextOp.needsInput()) {
269269
driverContext.checkForEarlyTermination();
270-
assert nextOp.isFinished() == false || nextOp instanceof ExchangeSinkOperator
270+
assert nextOp.isFinished() == false || nextOp instanceof ExchangeSinkOperator || nextOp instanceof LimitOperator
271271
: "next operator should not be finished yet: " + nextOp;
272272
Page page = op.getOutput();
273273
if (page == null) {

0 commit comments

Comments
 (0)