You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "deniskuzZ (via GitHub)" <gi...@apache.org> on 2024/08/23 12:35:43 UTC

Re: [PR] HIVE-28268: Iceberg: Retrieve row count from iceberg SnapshotSummary in case of iceberg.hive.keep.stats=false [hive]

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


##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/StatsOptimizer.java:
##########
@@ -943,6 +944,11 @@ private Long getRowCnt(
         }
       } else { // unpartitioned table
         if (!StatsUtils.areBasicStatsUptoDateForQueryAnswering(tbl, tbl.getParameters())) {
+          if (MetaStoreUtils.isNonNativeTable(tbl.getTTable())
+                  && tbl.getStorageHandler().canComputeQueryUsingStats(tbl)) {
+            return Long.valueOf(tbl.getStorageHandler().getBasicStatistics(Partish.buildFor(tbl))

Review Comment:
   can get NullPointer when `statsSource != ICEBERG`



-- 
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-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org