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

jackietien pushed a commit to branch PrintUDTFStack
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/PrintUDTFStack by this push:
     new 87b15d5668f remove duplicated exception
87b15d5668f is described below

commit 87b15d5668fb78e4425fc6774d9b229c6216e36d
Author: JackieTien97 <[email protected]>
AuthorDate: Thu Jul 31 17:10:37 2025 +0800

    remove duplicated exception
---
 .../operator/process/function/TableFunctionLeafOperator.java     | 9 +++++++--
 .../main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java  | 1 +
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/function/TableFunctionLeafOperator.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/function/TableFunctionLeafOperator.java
index 29e934c18ec..4a8e4d88b88 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/function/TableFunctionLeafOperator.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/function/TableFunctionLeafOperator.java
@@ -32,6 +32,8 @@ import org.apache.tsfile.enums.TSDataType;
 import org.apache.tsfile.read.common.block.TsBlock;
 import org.apache.tsfile.read.common.block.TsBlockBuilder;
 import org.apache.tsfile.read.common.block.column.RunLengthEncodedColumn;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.util.Arrays;
 import java.util.List;
@@ -40,6 +42,7 @@ import static 
org.apache.iotdb.db.queryengine.execution.operator.source.relation
 
 // only one input source is supported now
 public class TableFunctionLeafOperator implements ProcessOperator {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(TableFunctionLeafOperator.class);
 
   private final OperatorContext operatorContext;
   private final TsBlockBuilder blockBuilder;
@@ -76,8 +79,9 @@ public class TableFunctionLeafOperator implements 
ProcessOperator {
     try {
       processor.process(columnBuilders);
     } catch (Exception e) {
+      LOGGER.warn("Exception happened when executing UDTF: ", e);
       throw new IoTDBRuntimeException(
-          e.getMessage(), TSStatusCode.EXECUTE_UDF_ERROR.getStatusCode(), e, 
true);
+          e.getMessage(), TSStatusCode.EXECUTE_UDF_ERROR.getStatusCode(), 
true);
     }
     return buildTsBlock(columnBuilders);
   }
@@ -103,8 +107,9 @@ public class TableFunctionLeafOperator implements 
ProcessOperator {
     try {
       processor.beforeDestroy();
     } catch (Exception e) {
+      LOGGER.warn("Exception happened when executing UDTF: ", e);
       throw new IoTDBRuntimeException(
-          e.getMessage(), TSStatusCode.EXECUTE_UDF_ERROR.getStatusCode(), e, 
true);
+          e.getMessage(), TSStatusCode.EXECUTE_UDF_ERROR.getStatusCode(), 
true);
     }
   }
 
diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java
index 62b642f9ae5..e035a4f52bb 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java
@@ -120,6 +120,7 @@ public class ErrorHandlingUtils {
             || status.getCode() == 
TSStatusCode.NO_AVAILABLE_REPLICA.getStatusCode()
             || status.getCode() == 
TSStatusCode.CANNOT_FETCH_FI_STATE.getStatusCode()
             || status.getCode() == 
TSStatusCode.QUERY_EXECUTION_MEMORY_NOT_ENOUGH.getStatusCode()
+            || status.getCode() == 
TSStatusCode.EXECUTE_UDF_ERROR.getStatusCode()
             || status.getCode() == TSStatusCode.QUERY_TIMEOUT.getStatusCode()) 
{
           LOGGER.info(message);
         } else {

Reply via email to