bowenli86 commented on a change in pull request #8703: 
[FLINK-12807][hive]Support Hive table columnstats related operations in 
HiveCatalog
URL: https://github.com/apache/flink/pull/8703#discussion_r293541744
 
 

 ##########
 File path: 
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalog.java
 ##########
 @@ -1079,7 +1100,27 @@ public void alterPartitionStatistics(ObjectPath 
tablePath, CatalogPartitionSpec
 
        @Override
        public void alterPartitionColumnStatistics(ObjectPath tablePath, 
CatalogPartitionSpec partitionSpec, CatalogColumnStatistics columnStatistics, 
boolean ignoreIfNotExists) throws PartitionNotExistException, CatalogException {
+               try {
+                       Partition hivePartition = getHivePartition(tablePath, 
partitionSpec);
+                       Table hiveTable = getHiveTable(tablePath);
+                       String partName = getPartitionName(tablePath, 
partitionSpec, hiveTable);
+                       
client.updatePartitionColumnStatistics(HiveCatalogUtil.createPartitionColumnStats(hivePartition,
 partName, columnStatistics.getColumnStatisticsData()));
+               } catch (TableNotExistException | PartitionSpecInvalidException 
e) {
+                       throw new PartitionNotExistException(getName(), 
tablePath, partitionSpec, e);
 
 Review comment:
   need to check `ignoreIfNotExist` here

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