Fokko commented on code in PR #317: URL: https://github.com/apache/iceberg-go/pull/317#discussion_r1984950982
########## table/snapshots.go: ########## @@ -53,14 +55,130 @@ func ValidOperation(s string) (Operation, error) { return "", fmt.Errorf("%w: found '%s'", ErrInvalidOperation, s) } -const operationKey = "operation" +const ( + operationKey = "operation" + + addedDataFilesKey = "added-data-files" + addedDeleteFilesKey = "added-delete-files" + addedEqDeletesKey = "added-equality-deletes" + addedFileSizeKey = "added-files-size" + addedPosDeletesKey = "added-position-deletes" + addedPosDeleteFilesKey = "added-position-delete-files" + addedRecordsKey = "added-records" + addedEqDeleteFilesKey = "added-equality-delete-files" + deletedDataFilesKey = "deleted-data-files" + deletedRecordsKey = "deleted-records" + removedDeleteFilesKey = "removed-delete-files" + removedEqDeletesKey = "removed-equality-deletes" + removedEqDeleteFilesKey = "removed-equality-delete-files" + removedFileSizeKey = "removed-files-size" + removedPosDeletesKey = "removed-position-deletes" + removedPosDeleteFilesKey = "removed-position-delete-files" + totalEqDeletesKey = "total-equality-deletes" + totalPosDeletesKey = "total-position-deletes" + totalDataFilesKey = "total-data-files" + totalDeleteFilesKey = "total-delete-files" + totalRecordsKey = "total-records" + totalFileSizeKey = "total-files-size" + changedPartitionCountProp = "changed-partition-count" + changedPartitionPrefix = "partitions." +) + +type updateMetrics struct { + addedFileSize int64 + removedFileSize int64 + addedDataFiles int64 + removedDataFiles int64 + addedEqDeleteFiles int64 + removedEqDeleteFiles int64 + addedPosDeleteFiles int64 + removedPosDeleteFiles int64 + addedDeleteFiles int64 + removedDeleteFiles int64 + addedRecords int64 + deletedRecords int64 + addedPosDeletes int64 + removedPosDeletes int64 + addedEqDeletes int64 + removedEqDeletes int64 +} + +func (m *updateMetrics) addFile(df iceberg.DataFile) error { Review Comment: nit: ```suggestion func (m *updateMetrics) addDataFile(df iceberg.DataFile) error { ``` I think this is clear -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org