flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] docete commented on a change in pull request #9909: [FLINK-14381][table] Partition field names should be got from CatalogTable instead of source/sink
Date Fri, 18 Oct 2019 11:05:47 GMT
docete 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_r336421342
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/sinks/TableSinkUtils.scala
 ##########
 @@ -80,23 +81,12 @@ object TableSinkUtils {
         "field names via 'getPartitionFieldNames()' method."
       sink match {
         case pts: PartitionableTableSink =>
-          val partitionFields = pts.getPartitionFieldNames
-          if (partitionFields == null || partitionFields.isEmpty) {
-            throw new ValidationException(invalidMsg)
-          }
           staticPartitions.map(_._1) foreach { p =>
-            if (!partitionFields.contains(p)) {
+            if (!partitionKeys.contains(p)) {
               throw new ValidationException(s"Static partition column $p " +
-                s"should be in the partition fields list $partitionFields.")
+                s"should be in the partition fields list $partitionKeys.")
             }
           }
-          staticPartitions.map(_._1).zip(partitionFields).foreach {
 
 Review comment:
   Why you remove this validation? Does static partitions not appear before dynamic partitions
any more?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message