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.ADDITIONAL ADVICE
Since you are given a git repository, you can use git commands to simplify your work. For example, if you made a mistake and want to revert your changes, you can use
git checkout <file>to restore the file to its original state. You can also reset all changes in the repository usinggit reset --hardcommand. Additionally, you can usegit stashandgit stash popto temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you callsubmit) usinggit statusorgit diffcommands. However you don't need to usegit addorgit commitbefore submitting your changes. In fact,submitonly submits currently unstaged changes because it usesgit diffto get the changes that need to be submitted.CHECKLIST
Before submitting your solution, please go over the following checklist and make sure you've done everything:
- If an error was reported in the issue description, I have successfully reproduced it.
- If an error was reported in the issue description, I have confirmed that my fix resolves the error.
- I have thought about edge cases and made sure my fix handles them as well.
- I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass. I want you to list every bullet from this checklist and write your reasoning for why you think you did it or didn't need to.
Repository has been uploaded and your shell is currently at the repository root. Time to solve the issue!
(Current directory: /floci, current file: none) bash-$
- Floci version / image tag:
Assistant
Let me analyze the issue:
- The issue is about AWS Glue's
BatchDeleteTableAPI action not being supported in Floci - I need to implement this action in the Glue service
- The expected behavior is:
- When deleting multiple tables, if some tables don't exist, return errors for those tables
- Delete the existing tables successfully
- Return an Errors array for any tables that weren't found
Let me start by exploring the repository structure to understand how it's organized.
- The issue is about AWS Glue's
Assistant
Let me explore the Glue service specifically since that's where I need to make changes.
Assistant
Let me look at the GlueService.java file to understand the current implementation and see what's already there.
Assistant
Let me use bash to read the file.
Assistant
Now let me look at the GlueJsonHandler to understand how the JSON API actions are registered and handled:
Assistant
Now let me look at the existing tests to understand the test patterns:
Assistant
Now let me look at the AwsException class to understand error handling:
Assistant
Now let me check how Glue is registered (JSON vs Query protocol):
Assistant
Let me also check the Table model to understand its structure:
Assistant
Let me check the AwsJson11Controller to understand how actions are routed:
Assistant
Now I have a clear understanding of the architecture. Let me implement the
BatchDeleteTableaction:- Add the
batchDeleteTablesmethod toGlueService.java - Add the handler case in
GlueJsonHandler.java
Let me first check if there's a
BatchDeleteTableErrorrecord mentioned in the interface description, and also look at howdeleteTableworks (it needs to get the table first to verify it exists):- Add the
Assistant
I see that
deleteTablecurrently doesn't check if the table exists before deleting - it just deletes. ForBatchDeleteTable, I need to check if each table exists and report errors for missing ones. Let me look at thedeleteTablemethod more closely:Assistant
Now I have a complete understanding of the codebase. Let me implement the
BatchDeleteTablefunctionality.I need to:
- Add a
batchDeleteTablesmethod toGlueService.javawith aBatchDeleteTableErrorrecord - Add the handler case in
GlueJsonHandler.java
Let me start with the GlueService:
- Add a
Assistant
Now let me implement the changes. First, I'll add the
batchDeleteTablesmethod andBatchDeleteTableErrorrecord toGlueService.java:Assistant
Now I'll add the batch delete tables functionality. First, the GlueService changes:
Assistant
Good, the GlueService changes look correct. Now let me add the handler in GlueJsonHandler.java. I need to add a case for "BatchDeleteTable" in the switch statement:
Assistant
Let me open the GlueJsonHandler.java file and add the BatchDeleteTable case.
Assistant
I need to add the BatchDeleteTable case after DeleteTable. Let me do that.
Assistant
The edit tool needs proper input. Let me use the correct syntax.
Assistant
Now let me add the BatchDeleteTable handler case in GlueJsonHandler.java. I'll add it right after the DeleteTable case:
Assistant
Now let me add the BatchDeleteTable case after the DeleteTable case (after line 93):
Assistant
I need to use the edit tool with proper syntax. Let me try again with the correct multi-line syntax.
Assistant
Let me use a different approach with sed:
Assistant
Now I need to add a helper method
readStringListto read theTablesToDeletearray. Let me first verify the edit worked and then add the helper method:Assistant
Now I need to add the
readStringListhelper method. Let me find where to add it:Assistant
Let me add the
readStringListhelper method after thereadMaxResultsmethod:Assistant
Let me add the readStringList helper method after readMaxResults.
Assistant
Wait, I used a non-existent
JsonItemIterableclass. Let me fix that with the correct Jackson API:Assistant
Let me fix the readStringList method with the correct Jackson API:
Assistant
Let me fix the readStringList method with proper Jackson API using Iterator:
Assistant
Let me verify the fix was applied correctly:
Assistant
Now let me verify both files are correct:
Assistant
Good. Now let me verify the code compiles by running the build:
Assistant
Now I need to compile and test the changes. Let me run the build.
Assistant
Let me set the HOME variable and try again:
Assistant
The code compiles successfully (only warnings, no errors). Now let me run the existing tests to make sure nothing is broken:
Assistant
The tests seem to have passed. Let me verify by checking for any failure indicators.
Assistant
The command executed but didn't show any output matching the pattern. Let me check more explicitly if tests passed.
Assistant
All 24 existing tests pass. Now let me create a simple test script to verify the batch delete tables functionality works correctly:
Assistant
The logic is correct. Let me now look at the integration test patterns to understand how to verify the full implementation end-to-end:
Assistant
Let me look at how integration tests are structured to write a proper end-to-end verification:
Assistant
Let me look at the compatibility test to understand how to test the Glue API:
<tool_call> <function=bash_terminal> <parameter=command> cat /floci/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/GlueCatalogTest.java </tool_call>
Assistant
Let me run the command properly.
Assistant
Let me verify the complete implementation by viewing both modified files:
Assistant
Let me verify the complete implementation by checking both modified files:
Assistant
I need to verify the complete implementation by running the tests to confirm everything works.
Assistant
Good progress. Now let me write a unit test for the batchDeleteTables method in the GlueServiceTest class. I'll add it to verify the functionality works correctly.
Let me first check what the test file looks like and then add a test for batchDeleteTables.
Assistant
Now let me add a unit test for batchDeleteTables to the GlueServiceTest class to verify the functionality works correctly.
Assistant
Let me add a test for the batchDeleteTables method. I need to add it after the existing tests.
Assistant
Let me now add a unit test for the batchDeleteTables method to the GlueServiceTest:
Assistant
Now let me run the tests to verify the new tests pass:
Assistant
All 27 tests pass (24 original + 3 new ones). Let me verify the final implementation by checking the complete changes:
Assistant
Let me verify the complete implementation by checking the git diff to see all changes made.
Assistant
The implementation is complete. Let me run the tests one more time to confirm everything passes before submitting.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →