huangchenguang123 commented on code in PR #10014:
URL: https://github.com/apache/dolphinscheduler/pull/10014#discussion_r872023011


##########
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:
   resultSet is allways null, remove from the close method



-- 
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