KurtYoung commented on a change in pull request #8222: [FLINK-11518] [table] 
Add partition related catalog APIs and implement them in GenericInMemoryCatalog
URL: https://github.com/apache/flink/pull/8222#discussion_r278388857
 
 

 ##########
 File path: 
flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/ReadableWritableCatalog.java
 ##########
 @@ -131,4 +137,62 @@ void createTable(ObjectPath tablePath, CatalogBaseTable 
table, boolean ignoreIfE
        void alterTable(ObjectPath tableName, CatalogBaseTable newTable, 
boolean ignoreIfNotExists)
                throws TableNotExistException, CatalogException;
 
+       // ------ partitions ------
+
+       /**
+        * Create a partition.
+        *
+        * @param tablePath path of the table.
+        * @param partitionSpec partition spec of the partition
+        * @param partition the partition to add.
+        * @param ignoreIfExists flag to specify behavior if a table with the 
given name already exists:
+        *                       if set to false, it throws a 
TableAlreadyExistException,
+        *                       if set to true, nothing happens.
+        *
+        * @throws TableNotExistException thrown if the target table does not 
exist
+        * @throws TableNotPartitionedException thrown if the target table is 
not partitioned
+        * @throws PartitionSpecInvalidException thrown if the given partition 
spec is invalid
+        * @throws PartitionAlreadyExistsException thrown if the target 
partition already exists
+        * @throws CatalogException in case of any runtime exception
+        */
+       void createPartition(ObjectPath tablePath, CatalogPartitionSpec 
partitionSpec, CatalogPartition partition, boolean ignoreIfExists)
 
 Review comment:
   Can you explain more about this interface? In which case this API would be 
invoked. I mean, does there exists some partition-only operations? My feeling 
is most operations to partition is through table.

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