You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "zeroshade (via GitHub)" <gi...@apache.org> on 2025/05/19 15:44:40 UTC
Re: [PR] Implement snapshot expiration [iceberg-go]
zeroshade commented on code in PR #401:
URL: https://github.com/apache/iceberg-go/pull/401#discussion_r2096028620
##########
table/metadata.go:
##########
@@ -187,14 +187,14 @@ func MetadataBuilderFromBase(metadata Metadata) (*MetadataBuilder, error) {
b.loc = metadata.Location()
b.lastUpdatedMS = metadata.LastUpdatedMillis()
b.lastColumnId = metadata.LastColumnID()
- b.schemaList = metadata.Schemas()
+ b.schemaList = slices.Clone(metadata.Schemas())
b.currentSchemaID = metadata.CurrentSchema().ID
- b.specs = metadata.PartitionSpecs()
+ b.specs = slices.Clone(metadata.PartitionSpecs())
b.defaultSpecID = metadata.DefaultPartitionSpec()
b.lastPartitionID = metadata.LastPartitionSpecID()
- b.props = metadata.Properties()
- b.snapshotList = metadata.Snapshots()
- b.sortOrderList = metadata.SortOrders()
+ b.props = maps.Clone(metadata.Properties())
+ b.snapshotList = slices.Clone(metadata.Snapshots())
+ b.sortOrderList = slices.Clone(metadata.SortOrders())
Review Comment:
I wonder if there's a way we could lazily do this cloning? Avoid performing the copies until we actually need to?
--
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-unsubscribe@iceberg.apache.org
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