chenhao7253886 commented on a change in pull request #531: Add cpu and io indicates to audit log URL: https://github.com/apache/incubator-doris/pull/531#discussion_r248172593
########## File path: fe/src/main/java/org/apache/doris/qe/StmtExecutor.java ########## @@ -537,26 +542,34 @@ private void handleQueryStmt() throws Exception { // so We need to send fields after first batch arrived // send result - TResultBatch batch; + RowBatch batch; MysqlChannel channel = context.getMysqlChannel(); boolean isSendFields = false; - while ((batch = coord.getNext()) != null) { + + while ((batch = coord.getNext()) != null && !batch.isEos()) { if (!isSendFields) { sendFields(queryStmt.getColLabels(), queryStmt.getResultExprs()); } isSendFields = true; - - for (ByteBuffer row : batch.getRows()) { + for (ByteBuffer row : batch.getBatch().getRows()) { channel.sendOnePacket(row); } - context.updateReturnRows(batch.getRows().size()); + context.updateReturnRows(batch.getBatch().getRows().size()); } + setQueryStatisticsForAuditLog(batch); if (!isSendFields) { sendFields(queryStmt.getColLabels(), queryStmt.getResultExprs()); } context.getState().setEof(); } + private void setQueryStatisticsForAuditLog(RowBatch batch) { + if (batch != null) { + final PQueryStatistics statistics = batch.getQueryStatistics(); Review comment: i will fix it. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@doris.apache.org For additional commands, e-mail: dev-h...@doris.apache.org