You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ro...@apache.org on 2021/11/26 03:19:37 UTC

[iotdb] 02/02: fill exception instance into QueryProcessException if executor is down

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

rong pushed a commit to branch iotdb-2062
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit ac835cb70c327455ceae201c6296b8382606d5c3
Author: Steve Yurong Su <ro...@apache.org>
AuthorDate: Fri Nov 26 11:17:53 2021 +0800

    fill exception instance into QueryProcessException if executor is down
---
 .../org/apache/iotdb/db/exception/query/QueryProcessException.java    | 4 ++++
 .../org/apache/iotdb/db/query/udf/core/executor/UDTFExecutor.java     | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/exception/query/QueryProcessException.java b/server/src/main/java/org/apache/iotdb/db/exception/query/QueryProcessException.java
index e36b67f..6ea4ad3 100644
--- a/server/src/main/java/org/apache/iotdb/db/exception/query/QueryProcessException.java
+++ b/server/src/main/java/org/apache/iotdb/db/exception/query/QueryProcessException.java
@@ -38,6 +38,10 @@ public class QueryProcessException extends IoTDBException {
     super(message, errorCode);
   }
 
+  public QueryProcessException(String message, Throwable cause) {
+    super(message, cause, TSStatusCode.QUERY_PROCESS_ERROR.getStatusCode());
+  }
+
   public QueryProcessException(IoTDBException e) {
     super(e, e.getErrorCode(), e.isUserException());
   }
diff --git a/server/src/main/java/org/apache/iotdb/db/query/udf/core/executor/UDTFExecutor.java b/server/src/main/java/org/apache/iotdb/db/query/udf/core/executor/UDTFExecutor.java
index 48b94f9..184e063 100644
--- a/server/src/main/java/org/apache/iotdb/db/query/udf/core/executor/UDTFExecutor.java
+++ b/server/src/main/java/org/apache/iotdb/db/query/udf/core/executor/UDTFExecutor.java
@@ -107,7 +107,8 @@ public class UDTFExecutor {
     throw new QueryProcessException(
         String.format(
                 "Error occurred during executing UDTF#%s: %s", methodName, System.lineSeparator())
-            + e);
+            + e,
+        e);
   }
 
   public FunctionExpression getExpression() {