Skip to content

Commit

Permalink
[fix](statistics)Fix batch is null bug. (#36398)
Browse files Browse the repository at this point in the history
This PR changed result sink logic:
#36053
Need to change the show column stats get row batch logic to avoid NPE.
  • Loading branch information
Jibing-Li authored and dataroaring committed Jun 21, 2024
1 parent 8b422d1 commit 2207270
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3346,9 +3346,14 @@ public List<ResultRow> 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()));
}
}
Expand Down

0 comments on commit 2207270

Please sign in to comment.