felixschneider99 commented on issue #14743:
URL: https://github.com/apache/iceberg/issues/14743#issuecomment-3607208087

   Alright. The issue seems to be more specific in the REST Session Catalog. 
When working with the REST Session Catalog, it appears to generate an incorrect 
API call when executing `DROP TABLE ... PURGE`.
   
   I’m using AWS S3Tables Iceberg, which only support dropping tables when the 
request includes the flag purgeRequested=true. However, the REST Client does 
not set this flag, which results in the following error.
   
   Request
   `DELETE /iceberg/v1/<AWS Bucket ARN>/namespaces/<namespace>/tables/<table> 
HTTP/1.1[\r][\n]"`
   
   Stacktrace:
   > py4j.protocol.Py4JJavaError: An error occurred while calling o69.sql.
   : org.apache.iceberg.exceptions.BadRequestException: Malformed request: 
DropTable operation failed. S3 Tables only supports dropping tables with purge 
enabled.
           at 
org.apache.iceberg.rest.ErrorHandlers$DefaultErrorHandler.accept(ErrorHandlers.java:234)
           at 
org.apache.iceberg.rest.ErrorHandlers$TableErrorHandler.accept(ErrorHandlers.java:124)
           at 
org.apache.iceberg.rest.ErrorHandlers$TableErrorHandler.accept(ErrorHandlers.java:108)
           at 
org.apache.iceberg.rest.HTTPClient.throwFailure(HTTPClient.java:240)
           at org.apache.iceberg.rest.HTTPClient.execute(HTTPClient.java:336)
           at org.apache.iceberg.rest.HTTPClient.execute(HTTPClient.java:297)
           at 
org.apache.iceberg.rest.BaseHTTPClient.delete(BaseHTTPClient.java:55)
           at 
org.apache.iceberg.rest.RESTSessionCatalog.dropTable(RESTSessionCatalog.java:306)
           at 
org.apache.iceberg.catalog.BaseSessionCatalog$AsCatalog.dropTable(BaseSessionCatalog.java:112)
           at 
org.apache.iceberg.rest.RESTCatalog.dropTable(RESTCatalog.java:212)
           at 
org.apache.iceberg.spark.SparkCatalog.dropTableWithoutPurging(SparkCatalog.java:391)
           at 
org.apache.iceberg.spark.SparkCatalog.purgeTable(SparkCatalog.java:369)
   


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