ISSUE DESCRIPTION [BUG] Glue BatchDeleteTable is unsupported Service AWS Glue AWS API…
- User
ISSUE DESCRIPTION
[BUG] Glue BatchDeleteTable is unsupported
Service
AWS API Action
Expected behavior
AWS behavior supports
BatchDeleteTable. When the request contains one existing table and one missing table, AWS deletes the existing table and returns anErrorsentry for the missing table.AWS behavior verified with AWS CLI:
{ "Errors": [ { "TableName": "missing_table", "ErrorDetail": { "ErrorCode": "EntityNotFoundException", "ErrorMessage": "Table missing_table not found" } } ] }A subsequent
GetTablefor the existing table returnsEntityNotFoundException.Actual behavior
Floci
floci/floci:1.5.22rejectsBatchDeleteTableas an unsupported action.aws: [ERROR]: An error occurred (InvalidAction) when calling the BatchDeleteTable operation: Action BatchDeleteTable is not supportedReproduction
endpoint=http://localhost:4566 export AWS_ACCESS_KEY_ID=<redacted-secret> AWS_SECRET_ACCESS_KEY=<redacted-secret> AWS_DEFAULT_REGION=us-east-1 db=test_floci_batch_delete aws --endpoint-url "$endpoint" glue create-database --database-input "Name=$db" aws --endpoint-url "$endpoint" glue create-table \ --database-name "$db" \ --table-input 'Name=existing_table,StorageDescriptor={Columns=[{Name=id,Type=int}]}' aws --endpoint-url "$endpoint" glue batch-delete-table \ --database-name "$db" \ --tables-to-delete existing_table missing_tableEnvironment
- Floci version / image tag:
floci/floci:1.5.22 - Java SDK version (if applicable): AWS CLI
- How you're running Floci (Docker / native /
mvn quarkus:dev): Docker
Interface
Type: Function Name: batchDeleteTables Path: src/main/java/io/github/hectorvent/floci/services/glue/GlueService.java Input: String databaseName, List tableNames Output: List<GlueService.BatchDeleteTableError> Description: Deletes multiple tables by name within a database, skipping and reporting errors for any tables that are not found. Use this to process the
BatchDeleteTableAWS Glue API action. - Floci version / image tag:
Assistant
I'll start by exploring the repository structure to understand the codebase and then implement the
BatchDeleteTablefunctionality for AWS Glue.Assistant
Let me start by examining the GlueService.java file to understand the current implementation.
Assistant
Now let me check how the Glue API handler works to understand how actions are mapped:
Assistant
Now let me check the existing tests for GlueService to understand the testing patterns:
Assistant
Now let me look at the Glue integration tests to understand the expected behavior better:
Assistant
Let me check the AWS documentation format and see what the DeleteSchemaVersions response looks like since it seems to follow a similar pattern:
Assistant
Now I understand the pattern. Let me check how the deleteSchemaVersions method works in the schema registry service to understand the error handling pattern:
Assistant
Now let me understand the full structure. Let me create a test script first to reproduce the issue:
Assistant
Now let me implement the solution. Based on the issue description, I need to:
- Add a
batchDeleteTablesmethod toGlueService.javathat returns aList<BatchDeleteTableError> - Add the handler for
BatchDeleteTableinGlueJsonHandler.java
Let me first check what the exact response structure should be according to AWS documentation. Let me look at similar error structures:
- Add a
Assistant
Perfect! Now I understand the pattern. Let me implement the solution:
- First, add the
batchDeleteTablesmethod toGlueService.javawith a record for the error - Then, add the handler for
BatchDeleteTableinGlueJsonHandler.java
Let me start with
GlueService.java:- First, add the
Assistant
Now let me find the right place to insert this method in GlueService.java. Let me look at the end of the file:
Assistant
Let me find the line number of deleteTable method and insert batchDeleteTables after it:
Assistant
Now let me add the batchDeleteTables method after deleteTable. I'll use the edit command:
Assistant
Now let me insert this method after the deleteTable method:
Assistant
So line 171 is the closing brace of deleteTable, and line 172 starts createPartition. I need to insert the new method between them. Let me use the edit command:
Assistant
Let me verify the insertion was successful:
Assistant
Good! Now I need to add the handler in GlueJsonHandler.java. Let me find where to add it:
Assistant
Now let me add the BatchDeleteTable case after DeleteTable:
Assistant
Now I need to add the handler method. Let me find where to add it:
Assistant
Let me add the handleBatchDeleteTable method after handleDeleteUserDefinedFunction:
Assistant
Let me verify the changes:
Assistant
Good! Let me verify the complete handler method:
Assistant
Perfect! Now let me verify the changes compile correctly by running the tests:
Assistant
Let me check if the tests passed or if there were any compilation errors.
Assistant
Great! The tests pass. Now let me write a simple test script to verify the BatchDeleteTable functionality works as expected. Let me create a temporary test script:
Assistant
Now let me compile and run this test:
Assistant
I need to add the Partition import:
Assistant
Great! Now let's run the test:
Assistant
Excellent! All tests passed. Now let me verify that the existing tests still pass:
Assistant
The command failed. Let me check what went wrong.
Assistant
Perfect! Now let me also check if there are any integration tests for Glue that I should run:
Assistant
Let me check if there are any integration tests that test the JSON handler:
Assistant
Let me check the compatibility tests:
Assistant
Let me clean up the test file I created:
Assistant
Now let me verify my changes by reviewing them:
Assistant
Perfect! The changes look good. Let me run a broader set of tests to make sure I haven't broken anything:
Assistant
Excellent! All Glue-related tests pass. Now let me verify the solution matches the issue requirements. Let me review the implementation once more:
Assistant
Let me also verify that the handler produces the correct response format:
Assistant
Now let me create a comprehensive test to verify the edge cases mentioned in the issue:
Assistant
Perfect! Let me clean up the test file and run the existing tests once more to ensure everything is working:
Assistant
Now let me run all Glue tests one more time to make sure everything passes:
Assistant
Perfect! All tests pass. Let me create one more comprehensive edge case test to ensure the implementation handles all scenarios correctly:
Assistant
I need to run the edge case test to verify the implementation handles all scenarios correctly.
Assistant
Good, the test compiled. Now let me run it.
Assistant
Excellent! All edge case tests passed. Let me clean up the test file and verify the final implementation:
Assistant
Let me verify the changes one more time:
Assistant
Perfect! Let me create a summary of the changes I made and submit them:
Summary of Changes
I've successfully implemented the
BatchDeleteTableaction for AWS Glue. Here's what was done:Changes Made:
-
GlueService.java - Added the
batchDeleteTablesmethod andBatchDeleteTableErrorrecord:- The method validates the database exists
- Iterates through the list of table names
- Deletes existing tables (including their partitions)
- Returns errors for non-existent tables with
EntityNotFoundException - The
BatchDeleteTableErrorrecord captures error information for each missing table
-
GlueJsonHandler.java - Added the handler for the action:
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.