Fokko commented on code in PR #317:
URL: https://github.com/apache/iceberg-go/pull/317#discussion_r1984961840


##########
table/snapshots.go:
##########
@@ -197,3 +315,156 @@ type SnapshotLogEntry struct {
        SnapshotID  int64 `json:"snapshot-id"`
        TimestampMs int64 `json:"timestamp-ms"`
 }
+
+type SnapshotSummaryCollector struct {
+       metrics                          updateMetrics
+       partitionMetrics                 map[string]updateMetrics
+       maxChangedPartitionsForSummaries int
+}
+
+func (s *SnapshotSummaryCollector) setPartitionSummaryLimit(limit int) {
+       s.maxChangedPartitionsForSummaries = limit
+}
+
+func (s *SnapshotSummaryCollector) updatePartitionMetrics(spec 
iceberg.PartitionSpec, df iceberg.DataFile, isAddFile bool, sc *iceberg.Schema) 
error {
+       partitionPath := spec.PartitionToPath(getPartitionRecord(df, 
spec.PartitionType(sc)), sc)

Review Comment:
   It looks like we're passing down the spec and schema all the way here to 
construct the partitionPath, I'm wondering if it would be cleaner to just pass 
in the `partitionPath`?



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

Reply via email to