JingsongLi commented on a change in pull request #14977:
URL: https://github.com/apache/flink/pull/14977#discussion_r591191743



##########
File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/calcite/PreValidateReWriter.scala
##########
@@ -191,41 +267,40 @@ object PreValidateReWriter {
     SqlStdOperatorTable.VALUES.createCall(values.getParserPosition, fixedNodes)
   }
 
+  private def reorder(
+      sourceList: util.ArrayList[SqlNode],
+      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)

Review comment:
       Here should be `idx => targetList(idx) = 
sourceList.get(targetPosition.get(idx))` What do you think? @leonardBang 
@wuchong 




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to