kasakrisz commented on code in PR #4440:
URL: https://github.com/apache/hive/pull/4440#discussion_r1247648185


##########
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:
   I have a feeling that `setOrRemoveColumnStatsAccurateProperty` method should 
only be called only when the stats are managed by the StorageHandler. WDYT?



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

Reply via email to