wuchong commented on a change in pull request #15545:
URL: https://github.com/apache/flink/pull/15545#discussion_r612362954



##########
File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/calcite/PreValidateReWriter.scala
##########
@@ -272,7 +272,7 @@ object PreValidateReWriter {
       targetPosition: util.List[Int]): util.ArrayList[SqlNode] = {
     val targetList = new Array[SqlNode](sourceList.size())
     0 until sourceList.size() foreach {
-      idx => targetList(targetPosition.get(idx)) = sourceList.get(idx)
+      idx => targetList(idx) = sourceList.get(targetPosition.get(idx))

Review comment:
       nit: would be better to add a comment to describe what's the meaning of 
index and value of the `targetPosition`. I have to deep think it every time 
looking at this code. 




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to