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


##########
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java:
##########
@@ -261,13 +261,8 @@ private String resultProcess(ResultSet resultSet) throws 
Exception {
                 resultJSONArray.add(mapOfColValues);
                 rowCount++;
             }
-            int displayRows = sqlParameters.getDisplayRows() > 0 ? 
sqlParameters.getDisplayRows() : TaskConstants.DEFAULT_DISPLAY_ROWS;
-            displayRows = Math.min(displayRows, rowCount);
-            logger.info("display sql result {} rows as follows:", displayRows);
-            for (int i = 0; i < displayRows; i++) {
-                String row = JSONUtils.toJsonString(resultJSONArray.get(i));
-                logger.info("row {} : {}", i + 1, row);
-            }
+            // generate query results
+            generateRow(resultJSONArray, md, num, rowCount);

Review Comment:
   I think  when resultSet == null then resultJSONArray is empty, it will still 
result in no content when the email is sent, and an error RuntimeException will 
be reported.I will process the logic that the resultSet is empty, and write the 
result into the content as the fixed error content



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to