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:
json{ "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.textaws: [ERROR]: An error occurred (InvalidAction) when calling the BatchDeleteTable operation: Action BatchDeleteTable is not supportedReproduction
bashendpoint=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_table - Assistant
I'll start by exploring the repository structure to understand the codebase and locate relevant files. Let me first see the root directory.
- Assistant
Let me look at the repository structure more broadly.
- Assistant
Let me explore the src directory structure, especially looking for Glue-related files.
- Assistant
Let me examine the key files:
- Assistant
Now let me look at the GlueService.java to understand the existing structure.
- Assistant
Let me look at the test file and understand the patterns better:
- Assistant
- Assistant
Now let me check the
deleteTablemethod more carefully to understand how it handles missing tables: - Assistant
Let me check how
deleteTablecurrently works and understand the exact behavior needed. Looking at the code:javapublic void deleteTable(String databaseName, String tableName) { String key = tableKey(databaseName, tableName); tableStore.delete(key); partitionStore.scan(k -> k.startsWith(key + ":")).forEach(p -> { partitionStore.delete(key + ":" + String.join(",", p.getValues())); }); LOG.infov("Deleted Glue Table: {0}.{1}", databaseName, tableName); }It doesn't check if the table exists first - it just deletes the key. But for
BatchDeleteTable, the AWS behavior requires checking if tables exist and returning errors for missing ones.Let me check the Table model:
- Assistant
Now I have a good understanding of the codebase. Let me implement the
BatchDeleteTablefeature. I need to:- Add a
batchDeleteTablesmethod toGlueService.javawith aBatchDeleteTableErrorrecord - Add a
BatchDeleteTablecase toGlueJsonHandler.java
Let me start with the service layer:
- Add a
- Assistant
Now I have a clear understanding. Let me implement the changes. First, I'll add the
batchDeleteTablesmethod toGlueService.java: - Assistant
Now I'll add the
batchDeleteTablesmethod to GlueService.java after thedeleteTablemethod. I also need to add aBatchDeleteTableErrorrecord: - Assistant
Let me directly edit the file. I'll add the method after line 171 (after the deleteTable method):
- Assistant
Now I'll add the
batchDeleteTablesmethod after thedeleteTablemethod (after line 171). I also need to add theBatchDeleteTableErrorrecord at the end of the class. - Assistant
Let me fix the missing blank line between
batchDeleteTablesandcreatePartition: - Assistant
Now I need to add the
BatchDeleteTableErrorrecord to the end of the class. Let me check the end of the file: - Assistant
I'll add the
BatchDeleteTableErrorrecord right after theUserDefinedFunctionPagerecord: - Assistant
Let me add a blank line between the record and the next method:
- Assistant
Now I need to update the GlueJsonHandler to add the "BatchDeleteTable" case. Let me look at the existing "DeleteTable" handler:
- Assistant
Now I need to add the "BatchDeleteTable" case in the switch statement. I'll add it right after the "DeleteTable" case:
- Assistant
It seems the
DeleteTablecase is missing its closing bracket. Let me check and fix it: - Assistant
I see the problem - the
DeleteTablecase is missing its closing}. Let me fix it: - Assistant
Good, both files look correct now. Let me verify the changes by checking the diff:
- Assistant
Good, the changes look correct. Now let me run the existing tests to make sure everything compiles and the existing tests still pass:
- Assistant
Let me try running Maven with a different approach.
- Assistant
All existing tests pass. Now let me also run a full compilation to make sure everything compiles correctly:
- Assistant
Compilation succeeded. Now let me write a small test script to verify the behavior works correctly:
- Assistant
Let me verify the final state of both modified files:
- Assistant
Let me also verify the record definition at the end of the file:
- Assistant
Let me also verify the GlueJsonHandler changes:
- Assistant
Everything looks good. Let me run the full test suite to make sure nothing else is broken:
- Assistant
The full test suite timed out. Let me just run the relevant Glue tests to make sure they pass:
- Assistant
Let me verify the final diff one more time:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.