[fix](auditlog)Record return row count in audit log for internal query. (#39616) (#39702)

backport: https://github.com/apache/doris/pull/39616
This commit is contained in:
Jibing-Li
2024-08-21 17:37:01 +08:00
committed by GitHub
parent 610f69432a
commit 3a59ee1c5d

View File

@ -3138,9 +3138,12 @@ public class StmtExecutor {
LOG.info("Result rows for query {} is {}", DebugUtil.printId(queryId), resultRows.size());
return resultRows;
} else {
if (LOG.isDebugEnabled() && batch.getBatch() != null && batch.getBatch().rows != null) {
LOG.debug("Batch size for query {} is {}",
DebugUtil.printId(queryId), batch.getBatch().rows.size());
if (batch.getBatch().getRows() != null) {
context.updateReturnRows(batch.getBatch().getRows().size());
if (LOG.isDebugEnabled()) {
LOG.debug("Batch size for query {} is {}",
DebugUtil.printId(queryId), batch.getBatch().rows.size());
}
}
resultRows.addAll(convertResultBatchToResultRows(batch.getBatch()));
if (LOG.isDebugEnabled()) {