This is an automated email from the ASF dual-hosted git repository.

lijibing pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 3a59ee1c5da [fix](auditlog)Record return row count in audit log for 
internal query. (#39616) (#39702)
3a59ee1c5da is described below

commit 3a59ee1c5dae62f523037a29807c550a6d052f82
Author: Jibing-Li <[email protected]>
AuthorDate: Wed Aug 21 17:37:01 2024 +0800

    [fix](auditlog)Record return row count in audit log for internal query. 
(#39616) (#39702)
    
    backport: https://github.com/apache/doris/pull/39616
---
 fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

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 9f349891ce3..ba79ed73b85 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
@@ -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()) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to