From e79202fbde72b2c31b7e859d746647cb2f8ae85c Mon Sep 17 00:00:00 2001 From: Gal Lalouche Date: Fri, 27 Jun 2025 03:17:37 +0300 Subject: [PATCH] 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. --- .../main/java/org/elasticsearch/compute/operator/Driver.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/operator/Driver.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/operator/Driver.java index 775ac401cd916..00c1f14399525 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/operator/Driver.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/operator/Driver.java @@ -267,7 +267,8 @@ private IsBlockedResult runSingleLoopIteration() { if (op.isFinished() == false && nextOp.needsInput()) { driverContext.checkForEarlyTermination(); - assert nextOp.isFinished() == false : "next operator should not be finished yet: " + nextOp; + assert nextOp.isFinished() == false || nextOp instanceof ExchangeSinkOperator + : "next operator should not be finished yet: " + nextOp; Page page = op.getOutput(); if (page == null) { // No result, just move to the next iteration