wuchong commented on a change in pull request #8966: 
[FLINK-13074][table-planner-blink] Add PartitionableTableSink bridge logic to 
flink&blink …
URL: https://github.com/apache/flink/pull/8966#discussion_r305328268
 
 

 ##########
 File path: 
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/api/internal/TableEnvImpl.scala
 ##########
 @@ -532,7 +542,13 @@ abstract class TableEnvImpl(
 
       case Some(tableSink) =>
         // validate schema of source table and table sink
-        TableSinkUtils.validateSink(table.getQueryOperation, 
sinkTablePath.asJava, tableSink)
+        TableSinkUtils.validateSink(insertOptions.staticPartitions, 
table.getQueryOperation,
+          sinkTablePath.asJava, tableSink)
+        tableSink match {
+          case partitionableSink: PartitionableTableSink =>
 
 Review comment:
   Only set static partitions when sink has partitioned fields, i.e. is a 
partitioned sink. Currently, we set a partition map always which may have 
unexpected effects.

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

Reply via email to