fallintoplace opened a new pull request, #1436:
URL: https://github.com/apache/iceberg-go/pull/1436

   ## Summary
   
   - remove the Hadoop table directory directly after purging its files
   - avoid rechecking table metadata that the purge has already deleted
   - cover successful purge of a real table and a referenced external data file
   
   ## Root cause
   
   `PurgeTable` called `Table.PurgeFiles` before `DropTable`. The purge deletes 
the current metadata file, while `DropTable` requires a loadable metadata file 
to recognize the directory as a table. A successful file purge therefore caused 
`DropTable` to return `ErrNoSuchTable` and leave the empty table directory 
behind.
   
   The table has already been validated and loaded before cleanup begins, so 
the final recursive removal can safely use the previously resolved table path 
without a second metadata-based existence check.
   
   ## Validation
   
   - `go test ./catalog/hadoop -run 
'TestHadoopCatalogTestSuite/TestPurgeTable$' -count=1`
   - `go test ./catalog/hadoop -count=1`
   - `go test ./catalog/... -count=1`
   - `golangci-lint run --timeout=10m`
   


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