JingsongLi 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_r338857824
########## 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: Yes, we can. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services