kasakrisz commented on code in PR #4440: URL: https://github.com/apache/hive/pull/4440#discussion_r1245173261
########## ql/src/java/org/apache/hadoop/hive/ql/stats/ColStatsProcessor.java: ########## @@ -218,10 +221,15 @@ public int persistColumnStats(Hive db, Table tbl) throws HiveException, MetaExce } start = System. currentTimeMillis(); + boolean success = false; if (tbl != null && tbl.isNonNative() && tbl.getStorageHandler().canSetColStatistics(tbl)) { - tbl.getStorageHandler().setColStatistics(tbl, colStats); + success = tbl.getStorageHandler().setColStatistics(tbl, colStats); + } + success |= db.setPartitionColumnStatistics(request); + if (!(tbl.isMaterializedView() || tbl.isView() || tbl.isTemporary())) { + TableName tableName = new TableName(tbl.getCatalogName(), tbl.getDbName(), tbl.getTableName()); + setOrRemoveColumnStatsAccurateProperty(db, tableName, colStatDesc.getColName(), success); Review Comment: IIUC this method sets the state of Column stats at table level but it is not valid when only partition level column stats are updated hence the q.out changes. ``` success |= db.setPartitionColumnStatistics(request); ``` actually calls https://github.com/apache/hive/blob/24092d1ae3279499c236b0f156cbb707c12f1e12/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java#L9167-L9197 -- 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. To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org