Skip to content

feat(api): ReturnValues and ConditionExpression for PutItem/DeleteItem#7

Open
poyrazK wants to merge 3 commits into
mainfrom
release/dynamodb-returnvalues-conditions
Open

feat(api): ReturnValues and ConditionExpression for PutItem/DeleteItem#7
poyrazK wants to merge 3 commits into
mainfrom
release/dynamodb-returnvalues-conditions

Conversation

@poyrazK

@poyrazK poyrazK commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • PutItem ReturnValues ALL_NEW: After successful put, fetch and return the newly written item in
  • DeleteItem ReturnValues ALL_OLD: GET item before tombstone write, return pre-delete state in
  • PutItem ConditionExpression: Evaluate , , , , comparisons before write — return on failure
  • DeleteItem ConditionExpression: Same evaluation pattern before tombstone write
  • BatchWriteItem UnprocessedKeys: Storage engine tracks per-item failures in ; control plane reconstructs per table for client retry

Files changed

  • — 5 fixes in Java control plane
  • — per-item failure tracking in BatchWriteItem handler

Tests

  • 21/21 DynamoControllerTest pass
  • Zig storage engine builds successfully

poyrazK added 3 commits June 13, 2026 16:37
…/DeleteItem

- PutItem: add ReturnValues ALL_NEW support (fetch item after write)
- DeleteItem: add ReturnValues ALL_OLD support (get item before tombstone)
- PutItem: add ConditionExpression evaluation (attribute_not_exists, etc.)
- DeleteItem: add ConditionExpression evaluation before tombstone write
- Add evaluateCondition() helper mirroring expression_evaluator.zig logic
- BatchWriteItem: build UnprocessedKeys from failed items in conflicts list
- BatchWriteItem now collects failed item partition keys in reply_conflicts
- Each failed item is serialized as JSON for UnprocessedKeys reconstruction
- reply_success is false when any item fails
- Fix Zig JSON serialization: use std.json.fmt instead of manual concat
  to properly escape special characters in failed item JSON
- BatchWriteItem UnprocessedKeys: include sortKey in reconstructed
  DeleteRequest Key for composite key tables
- evaluateCondition: guard null children in AND/OR/NOT nodes
- Add hasPath() helper for nested attribute paths (address.city)
  and update extractScalarValue() to traverse dot-notation paths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant