marton-bod commented on a change in pull request #2329:
URL: https://github.com/apache/iceberg/pull/2329#discussion_r595216439



##########
File path: 
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java
##########
@@ -296,6 +302,17 @@ private void setHmsTableParameters(String 
newMetadataLocation, Table tbl, Map<St
       parameters.remove(hive_metastoreConstants.META_TABLE_STORAGE);
     }
 
+    // Set the basic statistics
+    if (summary.get(SnapshotSummary.TOTAL_DATA_FILES_PROP) != null) {
+      parameters.put(StatsSetupConst.NUM_FILES, 
summary.get(SnapshotSummary.TOTAL_DATA_FILES_PROP));
+    }

Review comment:
       I don't think so. For example, when we create a new table, Hive already 
puts numRows=0, totalSize=0, etc. into the HMS table params, so we would just 
end up removing those valid values here. Other than the 
we-just-created-the-table scenario, I think we should always have the summary 
object with these 3 values filled out. What do you think?




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



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

Reply via email to