dwilson1988 commented on code in PR #177: URL: https://github.com/apache/iceberg-go/pull/177#discussion_r1813528711
########## manifest.go: ########## @@ -831,14 +946,53 @@ func (m *manifestEntryV1) FileSequenceNum() *int64 { return m.FileSeqNum } -func (m *manifestEntryV1) DataFile() DataFile { return &m.Data } +func (m *manifestEntryV1) DataFile() DataFile { return m.Data } + +// ManifestEntryV2Builder is a helper for building a V2 manifest entry +// struct which will conform to the ManifestEntry interface. +type ManifestEntryV2Builder struct { + m *manifestEntryV2 +} + +// NewManifestEntryV2Builder is passed all of the required fields and then allows +// all of the optional fields to be set by calling the corresponding methods +// before calling [ManifestEntryV2Builder.Build] to construct the object. +func NewManifestEntryV2Builder(status ManifestEntryStatus, snapshotID int64, data DataFile) *ManifestEntryV2Builder { + return &ManifestEntryV2Builder{ + m: &manifestEntryV2{ + EntryStatus: status, + Snapshot: &snapshotID, + Data: data, Review Comment: okay - I can revert that change to what I had before. As it stands right now, I switched it to do the type assertion rather than use the interface type inside `manifestEntryVX`. Just to be clear: you'd like to use the interface type in `manifestEntryVX`? -- 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