tanmayrauth commented on code in PR #917:
URL: https://github.com/apache/iceberg-go/pull/917#discussion_r3101709276


##########
table/orphan_cleanup.go:
##########
@@ -308,62 +307,28 @@ func (t Table) scanFiles(fs iceio.IO, location string, 
cfg *orphanCleanupConfig)
        return allFiles, totalSize, nil
 }
 
-// getBucket gets the Bucket field from blob storage - absolute minimal 
approach
-func getBucketName(fsys iceio.IO) stdfs.FS {
-       v := reflect.ValueOf(fsys).Elem() // We know it's a pointer to struct
-
-       return v.FieldByName("Bucket").Interface().(stdfs.FS)
-}
+func walkDirectory(fsys iceio.IO, root string, fn func(path string, info 
stdfs.FileInfo) error) error {
+       listable, ok := fsys.(iceio.ListableIO)
+       if !ok {
+               return fmt.Errorf("IO implementation %T does not support 
directory listing (does not implement ListableIO)", fsys)

Review Comment:
   Agreed, done.
   



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