stalary commented on a change in pull request #6192:
URL: https://github.com/apache/incubator-doris/pull/6192#discussion_r677887444



##########
File path: fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java
##########
@@ -143,13 +145,15 @@ private void auditAfterExec(String origStmt, 
StatementBase parsedStmt, Data.PQue
         
         
ctx.getAuditEventBuilder().setFeIp(FrontendOptions.getLocalHostAddress());
 
-        // We put origin query stmt at the end of audit log, for parsing the 
log more convenient.
+        String sql;
         if (!ctx.getState().isQuery() && (parsedStmt != null && 
parsedStmt.needAuditEncryption())) {
-            ctx.getAuditEventBuilder().setStmt(parsedStmt.toSql());
+            sql = parsedStmt.toSql();
         } else {
-            ctx.getAuditEventBuilder().setStmt(origStmt);
+            sql = origStmt;
         }
-        
+        ctx.getAuditEventBuilder().setSqlHash(DigestUtils.md5Hex(sql));

Review comment:
       Ok, let me think about this




-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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

Reply via email to