Describe the bug
When the DynamoDb Enhanced Client executes a delete table request (via DeleteTableOperation), the operation name is mapped to OperationName.DELETE_ITEM instead of OperationName.DELETE_TABLE.
Regression Issue
Expected Behavior
When the Enhanced Client executes a delete table request (via DeleteTableOperation), the SDK should:
- Classify the operation as a table delete, i.e., it should use OperationName.DELETE_TABLE (not OperationName.DELETE_ITEM) for the operation metadata/context emitted by the Enhanced Client.
- As a result, instrumentation/metrics/tracing and any extension hooks that key off OperationName should see this request as a DeleteTable call (a control-plane/table-level operation), not an item-level delete.
- The underlying service call remains DynamoDB DeleteTable, which deletes the table and all items in it.
Current Behavior
When this method is called: software.amazon.awssdk.enhanced.dynamodb.internal.operations.DeleteTableOperation#operationName(), it returns OperationName.DELETE_ITEM.
Reproduction Steps
You can add a test in services-custom/dynamodb-enhanced/src/test/java/software/amazon/awssdk/enhanced/dynamodb/internal/operations/DeleteTableOperationTest.java:
@Test
public void operationName_returnsDeleteTable() {
DeleteTableOperation<FakeItemWithIndices> operation = DeleteTableOperation.create();
assertThat(operation.operationName().label(), is(OperationName.DELETE_TABLE.label()));
}
This test should pass, but is failing now:
java.lang.AssertionError:
Expected: is "DeleteTable"
but: was "DeleteItem"
Expected :DeleteTable
Actual :DeleteItem
Possible Solution
Replacing method: software.amazon.awssdk.enhanced.dynamodb.internal.operations.DeleteTableOperation#operationName()
@Override
public OperationName operationName() {
return OperationName.DELETE_ITEM;
}
with:
@Override
public OperationName operationName() {
return OperationName.DELETE_TABLE;
}
Additional Information/Context
No response
AWS Java SDK version used
2.42.4
JDK version used
21
Operating System and version
macOS Tahoe 26.3
Describe the bug
When the DynamoDb Enhanced Client executes a delete table request (via DeleteTableOperation), the operation name is mapped to
OperationName.DELETE_ITEMinstead ofOperationName.DELETE_TABLE.Regression Issue
Expected Behavior
When the Enhanced Client executes a delete table request (via DeleteTableOperation), the SDK should:
Current Behavior
When this method is called:
software.amazon.awssdk.enhanced.dynamodb.internal.operations.DeleteTableOperation#operationName(), it returnsOperationName.DELETE_ITEM.Reproduction Steps
You can add a test in services-custom/dynamodb-enhanced/src/test/java/software/amazon/awssdk/enhanced/dynamodb/internal/operations/DeleteTableOperationTest.java:
This test should pass, but is failing now:
Possible Solution
Replacing method: software.amazon.awssdk.enhanced.dynamodb.internal.operations.DeleteTableOperation#operationName()
with:
Additional Information/Context
No response
AWS Java SDK version used
2.42.4
JDK version used
21
Operating System and version
macOS Tahoe 26.3