rickchengx opened a new pull request, #11292: URL: https://github.com/apache/dolphinscheduler/pull/11292
<!--Thanks very much for contributing to Apache DolphinScheduler. Please review https://dolphinscheduler.apache.org/en-us/community/development/pull-request.html before opening a pull request.--> ## Purpose of the pull request Currently, the log does not output the currently executing sql statement while executing multiple sql statements. Also, the log output in the `prepareStatementAndBind()` is kind of odd: For example, as for multiple mysql statements, it outputs ``` [INFO] 2022-08-04 05:56:57.774 +0000 [taskAppId=TASK-20220804-6410011658368_11-73-78] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[367] - prepare statement replace sql : HikariProxyPreparedStatement@1694477678 wrapping com.mysql.cj.jdbc.ClientPreparedStatement: insert into student values ('Ton', 18); ``` which can output the sql statement. However, as for multiple hive statements, it outputs ``` [INFO] 2022-08-04 05:41:58.610 +0000 [taskAppId=TASK-20220804-6418931330048_7-72-77] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[367] - prepare statement replace sql : HikariProxyPreparedStatement@894649176 wrapping org.apache.hive.jdbc.HivePreparedStatement@4041a5d6 ``` which can not output the current sql statement since `toString()` is not implemented in the class `HivePreparedStatement`. So why don't we just delete the log output in the `prepareStatementAndBind()` and add the log output in the `executeUpdate()` ## Brief change log <!--*(for example:)* - *Add maven-checkstyle-plugin to root pom.xml* --> ## Verify this pull request <!--*(Please pick either of the following options)*--> This pull request is code cleanup without any test coverage. -- 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]
