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:
[email protected]
With regards,
Apache Git Services