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 2019/12/30 03:08:49 UTC

[GitHub] [flink] JingsongLi commented on a change in pull request #10700: [FLINK-15383][table sql / planner & legacy planner] Using sink schema field name instead of query schema field name for UpsertStreamTableSink.

JingsongLi commented on a change in pull request #10700: [FLINK-15383][table sql / planner & legacy planner] Using sink schema field name instead of query schema field name for UpsertStreamTableSink.
URL: https://github.com/apache/flink/pull/10700#discussion_r361889745
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/stream/StreamExecSink.scala
 ##########
 @@ -101,7 +101,9 @@ class StreamExecSink[T](
             // Now we pick shortest one to sink
             // TODO UpsertStreamTableSink setKeyFields interface should be Array[Array[String]]
             val tableKeys = {
-              UpdatingPlanChecker.getUniqueKeyFields(getInput, planner) match {
+              val sinkFieldNames = upsertSink.getTableSchema.getFieldNames.toList
+              UpdatingPlanChecker.getUniqueKeyFields(getInput, planner, sinkFieldNames)
+              match {
 
 Review comment:
   move `match {` to above line.

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


With regards,
Apache Git Services