deniskuzZ commented on code in PR #5400:
URL: https://github.com/apache/hive/pull/5400#discussion_r1728882960


##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/StatsOptimizer.java:
##########
@@ -945,7 +945,10 @@ private Long getRowCnt(
         if (!StatsUtils.areBasicStatsUptoDateForQueryAnswering(tbl, 
tbl.getParameters())) {
           return null;
         }
-        rowCnt = Long.valueOf(tbl.getProperty(StatsSetupConst.ROW_COUNT));
+        Map<String, String> basicStats = 
MetaStoreUtils.isNonNativeTable(tbl.getTTable()) ?
+          tbl.getStorageHandler().getBasicStatistics(tbl) : 
tbl.getParameters();

Review Comment:
   Oh sorry, I missed the https://github.com/apache/hive/pull/5215 
   I am not very certain how accurate is the `TOTAL_RECORDS_PROP` from the 
snapshot summary especially when there are deletes. 
   Since we have a statsSource flag I just wanted to be consistent where we 
take a stats.
   



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