github-actions[bot] commented on code in PR #70782:
URL: https://github.com/apache/doris/pull/70782#discussion_r4649484232


##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -2188,12 +2218,24 @@ public List<ResultRow> executeInternalQuery() {
                 LOG.warn("Failed to run internal SQL: {}", originStmt, e);
                 throw new RuntimeException("Failed to execute internal SQL. " 
+ Util.getRootCauseMessage(e), e);
             }
+            if (context.supportHandleByFe()) {
+                Optional<ResultSet> resultSet = 
planner.handleQueryInFe(parsedStmt);
+                if (resultSet.isPresent()) {
+                    isHandleQueryInFe = true;
+                    if (context.getSessionVariable().enableProfile() && 
profile != null) {
+                        
profile.getSummaryProfile().setExecutedByFrontend(true);
+                    }
+                    return resultSet.get().getResultRows().stream()

Review Comment:
   [P2] Account for rows returned by FE-handled internal queries. The new 
branch at executeInternalQuery() converts ResultSet.getResultRows() and returns 
without calling context.updateReturnRows(...), while the coordinator path 
updates it for every batch. SHOW CHARSET WHERE TRUE therefore returns one row 
but the nested internal audit/statistics context reports returnRows=0 (and 
returnedRows=0 by default). Update the counter before returning the FE result, 
matching the coordinator path.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to