You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/03/10 08:14:24 UTC

[GitHub] [flink] JingsongLi commented on a change in pull request #14977: [FLINK-18726][table-planner-blink] Support INSERT INTO specific colum…

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