You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/03/15 19:50:08 UTC

[GitHub] [iceberg] rdblue commented on a change in pull request #2329: Core/Hive: Introduce total-files-size snapshot metric and populate HMS

rdblue commented on a change in pull request #2329:
URL: https://github.com/apache/iceberg/pull/2329#discussion_r594637395



##########
File path: hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java
##########
@@ -296,6 +302,11 @@ private void setHmsTableParameters(String newMetadataLocation, Table tbl, Map<St
       parameters.remove(hive_metastoreConstants.META_TABLE_STORAGE);
     }
 
+    // Set the basic statistics
+    parameters.put(StatsSetupConst.NUM_FILES, summary.getOrDefault(SnapshotSummary.TOTAL_DATA_FILES_PROP, "0"));
+    parameters.put(StatsSetupConst.ROW_COUNT, summary.getOrDefault(SnapshotSummary.TOTAL_RECORDS_PROP, "0"));
+    parameters.put(StatsSetupConst.TOTAL_SIZE, summary.getOrDefault(SnapshotSummary.TOTAL_FILE_SIZE_PROP, "0"));

Review comment:
       If the summary property is missing, should we set the Hive property? I think this is correct only if `"0"` indicates to Hive that the value is not known.




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org