kokila-19 commented on code in PR #6603:
URL: https://github.com/apache/hive/pull/6603#discussion_r3594697168


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/IcebergTableUtil.java:
##########
@@ -778,7 +777,17 @@ static Map<String, String> getPartitionStats(Table table, 
Map<String, String> pa
     return toStatsMap(result);
   }
 
-  static Map<String, String> toStatsMap(PartitionStats stats) {
+  static Map<String, String> toStatsMap(PartitionStatistics stats) {
+    return ImmutableMap.of(
+        SnapshotSummary.TOTAL_DATA_FILES_PROP, 
String.valueOf(stats.dataFileCount()),
+        SnapshotSummary.TOTAL_RECORDS_PROP, 
String.valueOf(stats.dataRecordCount()),
+        SnapshotSummary.TOTAL_EQ_DELETES_PROP, 
String.valueOf(stats.equalityDeleteRecordCount()),
+        SnapshotSummary.TOTAL_POS_DELETES_PROP, 
String.valueOf(stats.positionDeleteRecordCount()),
+        SnapshotSummary.TOTAL_FILE_SIZE_PROP, 
String.valueOf(stats.totalDataFileSizeInBytes())
+    );
+  }
+
+  private static Map<String, String> toStatsMap(PartitionStats stats) {

Review Comment:
   PartitionStats will be removed from 1.12.0 and PartitionsStatistics should 
be used in future. 
   I have modified where there is issues for now. 
   I was thinking to migrate fully to PartitionStatistics in a separate PR.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to