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


##########
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:
   would it require huge refactor if we drop PartitionStats here?



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