KurtYoung commented on a change in pull request #9909: [FLINK-14381][table]
Partition field names should be got from CatalogTable instead of source/sink
URL: https://github.com/apache/flink/pull/9909#discussion_r338526706
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/delegation/PlannerBase.scala
##########
@@ -176,11 +176,11 @@ abstract class PlannerBase(
val input =
getRelBuilder.queryOperation(modifyOperation.getChild).build()
val identifier =
catalogManager.qualifyIdentifier(catalogSink.getTablePath: _*)
getTableSink(identifier).map(sink => {
- TableSinkUtils.validateSink(catalogSink, identifier, sink)
+ val partKeys =
+
catalogManager.getTable(identifier).get().asInstanceOf[CatalogTable].getPartitionKeys
+ TableSinkUtils.validateSink(catalogSink, identifier, sink, partKeys)
sink match {
- case partitionableSink: PartitionableTableSink
- if partitionableSink.getPartitionFieldNames != null
- && partitionableSink.getPartitionFieldNames.nonEmpty =>
+ case partitionableSink: PartitionableTableSink =>
Review comment:
see comment on `BatchExecSink`, should we just put the validation here? (For
partitioned table, we need to make sure the sink is `PartitionableTableSink`)
----------------------------------------------------------------
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