hackintoshrao opened a new pull request, #15164:
URL: https://github.com/apache/iceberg/pull/15164

   ## Summary
   
   Modify `RESTSessionCatalog.dropTable()` to explicitly send 
`purgeRequested=false` instead of omitting the parameter.
   
   ## Problem
   
   Currently, `dropTable(context, identifier)` sends a DELETE request without 
the `purgeRequested` parameter, relying on the server to default to `false`.
   
   However, some catalogs default `purgeRequested=true` to work around Spark's 
bug where it doesn't forward `purgeRequested=true` even with `DROP TABLE ... 
PURGE` (#11023, #11317).
   
   With such catalogs, calling `catalog.dropTable(identifier, false)` 
unexpectedly purges table data because the parameter is omitted and the server 
defaults to `true`.
   
   ## Solution
   
   Explicitly send `purgeRequested=false`:
   
   ```java
   client.delete(
       paths.table(identifier),
       ImmutableMap.of("purgeRequested", "false"),
       ...);
   ```
   
   This ensures the client's intent is honored regardless of server defaults.
   
   ## Related Issues
   
   - #11023 - deletion & purge improvements for undelete feature in REST catalog
   - #11317 - Spark: add property to disable client-side purging in spark


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