zhuangchong commented on code in PR #11292:
URL: https://github.com/apache/dolphinscheduler/pull/11292#discussion_r941937616
##########
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java:
##########
@@ -302,6 +302,7 @@ private String executeQuery(Connection connection, SqlBinds
sqlBinds, String han
private String executeUpdate(Connection connection, List<SqlBinds>
statementsBinds, String handlerType) throws Exception {
int result = 0;
for (SqlBinds sqlBind : statementsBinds) {
+ logger.info("{} statement execute update query, for sql: {}",
handlerType, sqlBind.getSql());
try (PreparedStatement statement =
prepareStatementAndBind(connection, sqlBind)) {
result = statement.executeUpdate();
logger.info("{} statement execute update result: {}, for sql:
{}", handlerType, result, sqlBind.getSql());
Review Comment:
I suggest improving the original log in the `prepareStatementAndBind`
method, outputting SQL and parameters.
`prepareStatementAndBind` is called in both executeQuery and executeUpdate,
and we also need to understand sql and sql parameters.
--
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]