abstractdog commented on code in PR #5648:
URL: https://github.com/apache/hive/pull/5648#discussion_r1977259837


##########
ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUtils.java:
##########
@@ -1043,12 +1017,8 @@ public static List<ColStatistics> getTableColumnStats(
     }
     if (fetchColStats && !colStatsToRetrieve.isEmpty()) {
       try {
-        List<ColumnStatisticsObj> colStat;
-        if (table.isNonNative() && 
table.getStorageHandler().canProvideColStatistics(table)) {
-          colStat = table.getStorageHandler().getColStatistics(table);
-        } else {
-          colStat = Hive.get().getTableColumnStatistics(dbName, tabName, 
colStatsToRetrieve, false);
-        }
+        List<ColumnStatisticsObj> colStat = 
Hive.get().getTableColumnStatistics(

Review Comment:
   it seems like  Hive.get().getTableColumnStatistics() is the final place 
where we decide whether to fetch col stats from metastore or fetch from 
storagehandler, which is fine if it's the final decision, but in this case this 
method's comment here is not accurate:
   ```
   Get table level column statistics from metastore for needed columns
   ```
   if we don't want to overthink, it's just:
   ```
   Get table level column statistics for needed columns
   ```
   
   
   



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