hdnpth commented on code in PR #985:
URL: https://github.com/apache/iceberg-go/pull/985#discussion_r3189693225


##########
manifest.go:
##########
@@ -339,8 +340,35 @@ func (m *manifestFile) FirstRowID() *int64 { return 
m.FirstRowIDValue }
 
 func (m *manifestFile) HasAddedFiles() bool    { return m.AddedFilesCount != 0 
}
 func (m *manifestFile) HasExistingFiles() bool { return m.ExistingFilesCount 
!= 0 }
-func (m *manifestFile) FetchEntries(fs iceio.IO, discardDeleted bool) 
([]ManifestEntry, error) {
-       return fetchManifestEntries(m, fs, discardDeleted)
+
+func (m *manifestFile) Entries(fs iceio.IO, discardDeleted bool) 
iter.Seq2[ManifestEntry, error] {
+       return func(yield func(ManifestEntry, error) bool) {
+               f, err := fs.Open(m.FilePath())
+               if err != nil {
+                       yield(nil, err)
+
+                       return
+               }
+               defer func() {
+                       _ = f.Close()

Review Comment:
   I do not like approach with returning synthetic pair, because it is so 
uncanonical



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

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