zjuwangg 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_r293639722
########## File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalog.java ########## @@ -1069,7 +1075,22 @@ public void alterTableStatistics(ObjectPath tablePath, CatalogTableStatistics ta @Override public void alterTableColumnStatistics(ObjectPath tablePath, CatalogColumnStatistics columnStatistics, boolean ignoreIfNotExists) throws TableNotExistException, CatalogException { - + try { + Table hiveTable = getHiveTable(tablePath); + // Set table column stats. This only works for non-partitioned tables. + if (!isTablePartitioned(hiveTable)) { + client.updateTableColumnStatistics(HiveCatalogUtil.createTableColumnStats(hiveTable, columnStatistics.getColumnStatisticsData())); + } else { + throw new CatalogException(String.format("Failed to alter partition table column stats of table %s", Review comment: exactly ---------------------------------------------------------------- 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