zhuangchong commented on code in PR #10014:
URL: https://github.com/apache/dolphinscheduler/pull/10014#discussion_r871985271
##########
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:
the close method only has connection as an input parameter, it is also
recommended to modify.
--
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]