You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/09/20 11:45:54 UTC

[GitHub] [dolphinscheduler] fengjian1129 commented on a diff in pull request #12059: [Bug-#12057][task-plugin] fix when the sql query result is empty, the email fails to send the attachment, and an exception will be reported

fengjian1129 commented on code in PR #12059:
URL: https://github.com/apache/dolphinscheduler/pull/12059#discussion_r975254342


##########
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java:
##########
@@ -255,6 +255,15 @@ private String resultProcess(ResultSet resultSet) throws Exception {
                 resultJSONArray.add(mapOfColValues);
                 rowCount++;
             }
+            // result is null,output table metadata
+            if (resultJSONArray.isEmpty()) {

Review Comment:
   If num=0, it is impossible. This "num" represents the number of fields. The query result cannot be without fields



-- 
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-unsubscribe@dolphinscheduler.apache.org

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