bowenli86 commented on a change in pull request #8636: 
[FLINK-12237][hive]Support Hive table stats related operations in HiveCatalog
URL: https://github.com/apache/flink/pull/8636#discussion_r293932104
 
 

 ##########
 File path: 
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalog.java
 ##########
 @@ -1094,7 +1153,15 @@ public CatalogColumnStatistics 
getTableColumnStatistics(ObjectPath tablePath) th
 
        @Override
        public CatalogTableStatistics getPartitionStatistics(ObjectPath 
tablePath, CatalogPartitionSpec partitionSpec) throws 
PartitionNotExistException, CatalogException {
-               throw new UnsupportedOperationException();
+               try {
+                       Partition partition = getHivePartition(tablePath, 
partitionSpec);
+                       return 
createCatalogTableStatistics(partition.getParameters());
+               } catch (TableNotExistException | PartitionSpecInvalidException 
e) {
+                       throw new PartitionNotExistException(getName(), 
tablePath, partitionSpec, e);
+               } catch (TException e) {
+                       throw new CatalogException(String.format("Failed to get 
table stats of table %s 's partition %s",
 
 Review comment:
   ```suggestion
                        throw new CatalogException(String.format("Failed to get 
partition stats of table %s 's partition %s",
   ```

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