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
Let me analyze the issue:
- The bug is about AWS Glue's
BatchDeleteTableaction being unsupported in Floci - The expected behavior is that when deleting multiple tables, existing tables should be deleted and missing tables should return errors
- I need to implement this functionality in the GlueService
Let me start by exploring the repository structure to understand how it's organized.
- The bug is about AWS Glue's
Assistant
Let me look at the GlueService.java file mentioned in the issue description.
Assistant
Let me look at the GlueService.java file to understand its current structure and what methods already exist.
Assistant
The environment doesn't allow me to use
opendirectly in the tool call. Let me usebashto read the file instead.Assistant
Now let me look at the GlueJsonHandler.java to understand how the API actions are mapped to methods in the GlueService:
Assistant
Now let me look at the existing GlueService test to understand test patterns:
Assistant
Now I have a good understanding of the codebase. Let me implement the
BatchDeleteTablefunctionality:- Add the
BatchDeleteTableErrorrecord andbatchDeleteTablesmethod toGlueService.java - Add the handler case for "BatchDeleteTable" in
GlueJsonHandler.java
Let me first check the AwsException class to understand its structure:
- Add the
Assistant
Now let me understand the AWS BatchDeleteTable response format and implement the solution. I'll add the method to GlueService.java and the handler to GlueJsonHandler.java.
Assistant
Let me find the exact line numbers for the
deleteTablemethod:Assistant
Now I need to add the
batchDeleteTablesmethod and theBatchDeleteTableErrorrecord to GlueService.java. I'll add it right after thedeleteTablemethod (around line 171). Let me check what's around that area:Assistant
Now I need to add the
batchDeleteTablesmethod after thedeleteTablemethod. I'll also need to add theBatchDeleteTableErrorrecord at the end of the class. Let me also check the end of the file to find a good place for the record:Assistant
Now I'll add the
batchDeleteTablesmethod andBatchDeleteTableErrorrecord. Let me insert the method after line 171 (after thedeleteTablemethod):Assistant
The
deleteTablemethod ends at line 171, and line 173 starts thecreatePartitionmethod. Let me add thebatchDeleteTablesmethod after thedeleteTablemethod by using the edit command.Let me use the edit command to insert the new method after line 171.
Assistant
I need to use the
edittool properly. Let me insert the new method after line 171 (after the closing brace of deleteTable method).Assistant
Let me use the
editcommand to insert the new method after thedeleteTablemethod:Assistant
Let me use the
editcommand properly to insert the new method:Assistant
Let me insert the new method after line 171 using a sed command:
Assistant
Now let me verify the method was added correctly:
Assistant
Now I need to add the
BatchDeleteTableErrorrecord at the end of the class. Let me find the end of the file:Assistant
Now let me add the
BatchDeleteTableErrorrecord before the closing brace of the class. First, let me find the line number:Assistant
Let me add the
BatchDeleteTableErrorrecord before the closing brace. First, let me check what's at line 452:Assistant
I need to add the
BatchDeleteTableErrorrecord before the closing brace. Let me insert it:Assistant
Now I need to verify the record was added correctly and then add the handler in GlueJsonHandler.java.
Assistant
Now I need to add the handler for "BatchDeleteTable" in GlueJsonHandler.java. Let me find where the switch statement's "DeleteTable" case is:
Assistant
Let me see the DeleteTable case and the default case:
Assistant
Now let me add the BatchDeleteTable handler after the DeleteTable case. I'll insert it after line 93:
Assistant
Let me verify the changes:
Assistant
Now let me verify the build compiles correctly:
Assistant
The code compiles successfully. Now let me verify the complete implementation by checking both files and then run the existing tests to make sure nothing is broken.
Assistant
Tests pass. Now let me write a quick verification script to test the batchDeleteTables functionality:
Assistant
The test was created. I notice I had some unnecessary code in the test (
Partition p2 = new Table().getClass().isInstance(new Table()) ? new Table() : new Partition();- but since both Table and Partition are different types, the ternary is justnew Partition()). Let me simplify that.Wait, the ternary expression
new Table().getClass().isInstance(new Table()) ? new Table() : new Partition()- this will returnnew Table()becausenew Table()IS an instance ofTable. Let me fix this test.Actually, let me just run the test first and see if it compiles and passes.
Assistant
All tests passed. Let me clean up the test file since we only needed it for verification, and run the existing GlueServiceTest to make sure our changes don't break anything:
Assistant
Now let me run all the existing Glue tests to make sure nothing is broken:
Assistant
All existing tests pass. Let me verify the complete implementation by viewing the final state of both modified files:
Assistant
Let me verify the final state of both files and then submit the changes.
Assistant
Let me verify the final state of the GlueJsonHandler.java changes and then submit:
Assistant
Let me verify the changes are complete and correct by viewing the full diff.
Assistant
The implementation is complete. Let me summarize what was done:
Summary of Changes
1.
GlueService.java-
Added
batchDeleteTables(String databaseName, List<String> tableNames)method:- Validates the database exists (throws
EntityNotFoundExceptionif not) - Iterates through table names, attempting to delete each one
- For existing tables: deletes them and their associated partitions
- For missing tables: creates a
BatchDeleteTableErrorwith error code "EntityNotFoundException" - Returns a list of errors (empty if all tables were found and deleted)
- Validates the database exists (throws
-
Added
BatchDeleteTableErrorrecord as a public record inside the class with fields:tableName,errorCode,
-
Assistant
The implementation is complete. Let me submit the changes.
Assistant
The user is asking me to call the
submitcommand to terminate the session and submit my changes. Looking at the previous turn, it seems the submit command was attempted but there was an error with the tool call format. Let me try again with the proper format.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.