You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/08/01 09:26:29 UTC

[GitHub] [dolphinscheduler] ruanwenjun commented on a diff in pull request #10746: [Feature][SQLTask] Suggest SQL task support variables in anywhere

ruanwenjun commented on code in PR #10746:
URL: https://github.com/apache/dolphinscheduler/pull/10746#discussion_r934322897


##########
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java:
##########
@@ -291,20 +292,20 @@ private void sendAttachment(int groupId, String title, String content) {
         setTaskAlertInfo(taskAlertInfo);
     }
 
-    private String executeQuery(Connection connection, SqlBinds sqlBinds, String handlerType) throws Exception {
-        try (PreparedStatement statement = prepareStatementAndBind(connection, sqlBinds)) {
-            logger.info("{} statement execute query, for sql: {}", handlerType, sqlBinds.getSql());
-            ResultSet resultSet = statement.executeQuery();
+    private String executeQuery(Connection connection, String sql, String handlerType) throws Exception {
+        try (Statement statement = connection.createStatement()) {
+            ResultSet resultSet = statement.executeQuery(sql);

Review Comment:
   Please close the ResultSet



-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org