zhuangchong commented on code in PR #10014:
URL: https://github.com/apache/dolphinscheduler/pull/10014#discussion_r871915717
##########
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java:
##########
@@ -197,7 +198,9 @@ public void executeFuncAndSql(List<SqlBinds>
mainStatementsBinds,
// decide whether to executeQuery or executeUpdate based on sqlType
if (sqlParameters.getSqlType() == SqlType.QUERY.ordinal()) {
// query statements need to be convert to JsonArray and
inserted into Alert to send
- resultSet = executeQuery(connection,
mainStatementsBinds.get(0), "main");
+ statement = prepareStatementAndBind(connection,
mainStatementsBinds.get(0));
+ logger.info("main statement execute query, for sql: {}",
mainStatementsBinds.get(0).getSql());
+ resultSet = statement.executeQuery();
Review Comment:
I do not recommend this modification. You can put the resultProcess method
in the query method, and the close method only has connection as an input
parameter.
--
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]