diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java b/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java index 5d8958a53d7941..b32109ced5f8e5 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java @@ -3346,9 +3346,14 @@ public List executeInternalQuery() { try { while (true) { batch = coord.getNext(); - if (batch == null || batch.isEos()) { + Preconditions.checkNotNull(batch, "Batch is Null."); + if (batch.isEos()) { return resultRows; } else { + // For null and not EOS batch, continue to get the next batch. + if (batch.getBatch() == null) { + continue; + } resultRows.addAll(convertResultBatchToResultRows(batch.getBatch())); } }