Skip to content

Set tableSchema to chained extensions read context #2971

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/next-release/bugfix-AWSSDKforJavav2-820a3eb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"category": "AWS SDK for Java v2",
"contributor": "alvinsee",
"type": "bugfix",
"description": "sets tableSchema field when provisioning the extension context in ChainExtension#afterRead"
}
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ public ReadModification afterRead(DynamoDbExtensionContext.AfterRead context) {
DefaultDynamoDbExtensionContext.builder().items(itemToTransform)
.operationContext(context.operationContext())
.tableMetadata(context.tableMetadata())
.tableSchema(context.tableSchema())
.build();

ReadModification readModification = iterator.next().afterRead(afterRead);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ private DefaultDynamoDbExtensionContext getExtensionContext(int i, OperationName
DefaultDynamoDbExtensionContext.Builder context =
DefaultDynamoDbExtensionContext.builder()
.tableMetadata(FakeItem.getTableMetadata())
.tableSchema(FakeItem.getTableSchema())
.operationContext(PRIMARY_CONTEXT)
.items(fakeItems.get(i));
if (operationName != null) {
Expand Down