Github user dianfu commented on a diff in the pull request:
https://github.com/apache/flink/pull/5025#discussion_r151609700
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/StreamTableEnvironment.scala
---
@@ -234,11 +234,12 @@ abstract class StreamTableEnvironment(
"UpsertStreamTableSink requires that Table has a full primary
keys if it is updated.")
}
val outputType = sink.getOutputType
+ val resultType = getResultType(table.getRelNode, optimizedPlan)
--- End diff --
Do you mean adding method such as `getResultType` in `TableSink`? The
`resultType` means the type of the result of the current sql query. IMO, even
we can specify the `resultType` in `TableSink`, it can only be used for
validation purpose, we should not use it directly. Thoughts?
---