njnu-seafish commented on code in PR #17702:
URL:
https://github.com/apache/dolphinscheduler/pull/17702#discussion_r2587155659
##########
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java:
##########
@@ -246,11 +248,23 @@ private String resultProcess(ResultSet resultSet) throws
Exception {
if (resultSet != null) {
ResultSetMetaData md = resultSet.getMetaData();
int num = md.getColumnCount();
+ String[] columnLabels = new String[num];
Review Comment:
> This variable seems meaningless.
mapOfColValues.set(md.getColumnLabel(i),
JSONUtils.toJsonNode(resultSet.getObject(i)));
to
mapOfColValues.set(columnLabels[i - 1],
JSONUtils.toJsonNode(resultSet.getObject(i)));
--
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]