saowu commented on code in PR #16595:
URL:
https://github.com/apache/dolphinscheduler/pull/16595#discussion_r1768160283
##########
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java:
##########
@@ -253,9 +255,18 @@ private String resultProcess(ResultSet resultSet) throws
Exception {
: JSONUtils.toJsonString(resultJSONArray);
if (Boolean.TRUE.equals(sqlParameters.getSendEmail())) {
+ resultJSONArray.forEach(row -> {
+ row.fields().forEachRemaining(field -> {
+ if (field.getValue() instanceof NullNode) {
+ field.setValue(new TextNode("null"));
+ }
+ });
+ });
+ String sendResult = resultJSONArray.isEmpty() ?
JSONUtils.toJsonString(generateEmptyRow(resultSet))
+ : JSONUtils.toJsonString(resultJSONArray);
Review Comment:
I started all the projects and tested them with simulated data.
--
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]