Browse Source

Merge branch 'dev' into dev

pull/2/MERGE
xsbai 5 years ago committed by GitHub
parent
commit
c56e555ae0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/sql/SqlTask.java

11
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/sql/SqlTask.java

@ -270,16 +270,9 @@ public class SqlTask extends AbstractTask {
String result = JSONUtils.toJsonString(resultJSONArray); String result = JSONUtils.toJsonString(resultJSONArray);
logger.debug("execute sql : {}", result); logger.debug("execute sql : {}", result);
// if there is a result set sendAttachment(StringUtils.isNotEmpty(sqlParameters.getTitle()) ?
if (!resultJSONArray.isEmpty(null) ) { sqlParameters.getTitle(): taskExecutionContext.getTaskName() + " query result sets",
if (StringUtils.isNotEmpty(sqlParameters.getTitle())) {
sendAttachment(sqlParameters.getTitle(),
JSONUtils.toJsonString(resultJSONArray)); JSONUtils.toJsonString(resultJSONArray));
}else{
sendAttachment(taskExecutionContext.getTaskName() + " query resultsets ",
JSONUtils.toJsonString(resultJSONArray));
}
}
} }
/** /**

Loading…
Cancel
Save