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

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


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

commit 9ee7f2a001bfb0e1aed5a43077bced1e83198d6f
Author: Jibing-Li <64681310+jibing...@users.noreply.github.com>
AuthorDate: Wed Aug 21 15:15:10 2024 +0800

    [fix](auditlog)Record return row count in audit log for internal query. 
(#39616)
    
    Record return row count in audit log for internal query. Before, the
    returned row count for internal select in audit log is always 0.
---
 .../src/main/java/org/apache/doris/qe/StmtExecutor.java   | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 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 64b216052ab..d5c54fbb6fc 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
@@ -3340,11 +3340,18 @@ public class StmtExecutor {
                         if (batch.getBatch() == null) {
                             continue;
                         }
-                        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()));
-                        LOG.debug("Result size for query {} is currently {}",
-                                DebugUtil.printId(queryId), 
batch.getBatch().rows.size());
+                        if (LOG.isDebugEnabled()) {
+                            LOG.debug("Result size for query {} is currently 
{}",
+                                    DebugUtil.printId(queryId), 
resultRows.size());
+                        }
                     }
                 }
             } catch (Exception e) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to