Revanth14 opened a new issue, #2217:
URL: https://github.com/apache/iceberg-go/issues/2217

   ### Feature Request / Improvement
   
   ## Problem
   
   `blobfs.FileIO.WalkDir` fails before visiting anything when the root ends in 
`/`:
   
       WalkDir("s3://bucket/tbl")   -> visits tbl, tbl/data, tbl/data/a.parquet
       WalkDir("s3://bucket/tbl/")  -> stat tbl/: invalid argument
   
   `WalkDir` passes the key `tbl/` straight to `fs.WalkDir`, and `walkFS.Stat` 
rejects it via `fs.ValidPath`. Reproduced on main (a5c6bc9) with memblob.
   
   ## Impact
   
   Orphan cleanup (`walkDirectory` in `table/maintenance/orphan_cleanup.go`) 
returns walk errors, so a cleanup location written as `s3://bucket/tbl/` fails 
the whole scan. `PurgeFiles` walks the table location and would hit the same 
error if a location ever ends in `/`.
   
   ## Proposed fix
   
   Trim trailing `/` from the walk key before calling `fs.WalkDir`, and check 
that `walkedURIPath` still joins the walked paths correctly. Test: walking 
`s3://bucket/tbl/` reports the same paths as `s3://bucket/tbl`.
   
   


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