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

yiguolei 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 5e7afa768e6 [fix](statistics)Avoid potential NPE #28147
5e7afa768e6 is described below

commit 5e7afa768e6842f807b95685610ceee7d3af5149
Author: Jibing-Li <64681310+jibing...@users.noreply.github.com>
AuthorDate: Fri Dec 8 20:42:17 2023 +0800

    [fix](statistics)Avoid potential NPE #28147
---
 fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 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 966635a4cb3..50af27f47f6 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
@@ -2021,7 +2021,9 @@ public class StmtExecutor {
                  */
                 throwable = t;
             } finally {
-                coord.close();
+                if (coord != null) {
+                    coord.close();
+                }
                 finalizeQuery();
             }
 
@@ -2725,7 +2727,9 @@ public class StmtExecutor {
                 throw new RuntimeException("Failed to fetch internal SQL 
result. " + Util.getRootCauseMessage(e), e);
             }
         } finally {
-            coord.close();
+            if (coord != null) {
+                coord.close();
+            }
             AuditLogHelper.logAuditLog(context, originStmt.toString(), 
parsedStmt, getQueryStatisticsForAuditLog(),
                     true);
             QeProcessorImpl.INSTANCE.unregisterQuery(context.queryId());


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

Reply via email to